Coverage for jstark / features / count_if.py: 100%
9 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-04-30 09:36 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-04-30 09:36 +0000
1"""CountIf feature"""
3from typing import Callable
4import pyspark.sql.functions as f
5from pyspark.sql import Column
8from jstark.features.feature import BaseFeature
11class CountIf(BaseFeature):
12 def aggregator(self) -> Callable[[Column], Column]:
13 return self.count_if_aggregator
15 def default_value(self) -> Column:
16 return f.lit(0)