sum_operator¶
Sum operator
-
class
tasrif.processing_pipeline.pandas.sum_operator.
SumOperator
(**kwargs)¶ Sum operator
Examples
>>> import pandas as pd >>> from tasrif.processing_pipeline.pandas import SumOperator >>> df = pd.DataFrame([ >>> [1, 1, 3], >>> [1, 1, 5], >>> [1, 2, 3], >>> [2, 1, 10], >>> [2, 1, 0]], >>> columns=['logId', 'sleep_level', 'awake_count']) >>> >>> df = df.set_index('logId') >>> op = SumOperator() >>> df1 = op.process(df) >>> df1[0] sleep_level 6 awake_count 21 dtype: int64
-
__init__
(**kwargs)¶ Creates a new instance of SumOperator
- Parameters
**kwargs – Arguments to pandas pd.sum function
-