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

12 statements  

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

1"""NetSpend feature""" 

2import pyspark.sql.functions as f 

3from pyspark.sql import Column 

4 

5from .sum_feature import Sum 

6 

7 

8class NetSpend(Sum): 

9 def column_expression(self) -> Column: 

10 return f.col("NetSpend") 

11 

12 @property 

13 def description_subject(self) -> str: 

14 return "Sum of NetSpend" 

15 

16 @property 

17 def commentary(self) -> str: 

18 return ( 

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

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

21 )