Coverage for jstark/features/channel_count.py: 100%
12 statements
« prev ^ index » next coverage.py v7.4.3, created at 2024-02-25 20:09 +0000
« prev ^ index » next coverage.py v7.4.3, created at 2024-02-25 20:09 +0000
1"""ChannelCount feature"""
2import pyspark.sql.functions as f
3from pyspark.sql import Column
5from .distinctcount_feature import DistinctCount
8class ChannelCount(DistinctCount):
9 def column_expression(self) -> Column:
10 return f.col("Channel")
12 @property
13 def description_subject(self) -> str:
14 return "Distinct count of Channels"
16 @property
17 def commentary(self) -> str:
18 return (
19 "Channels may be things like 'instore' or 'online', although you can supply"
20 + " whatever values you want. Perhaps they are marketing channels. This "
21 + " feature is the number of distinct channels in which activity occurred."
22 )