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