Coverage for jstark/features/gross_spend.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-02-25 20:09 +0000

1"""GrossSpend feature""" 

2import pyspark.sql.functions as f 

3from pyspark.sql import Column 

4 

5from .sum_feature import Sum 

6 

7 

8class GrossSpend(Sum): 

9 def column_expression(self) -> Column: 

10 return f.col("GrossSpend") 

11 

12 @property 

13 def description_subject(self) -> str: 

14 return "Sum of GrossSpend" 

15 

16 @property 

17 def commentary(self) -> str: 

18 return ( 

19 "The definition of GrossSpend can be whatever you want " 

20 + "it to be though typically its the price inclusive of any tax paid" 

21 )