mean_operator¶
Mean operator
-
class
tasrif.processing_pipeline.pandas.mean_operator.
MeanOperator
(**kwargs)¶ Mean operator
Examples
>>> import pandas as pd >>> from tasrif.processing_pipeline.pandas import MeanOperator >>> 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 = MeanOperator() >>> df1 = op.process(df) >>> df1[0] sleep_level 1.2 awake_count 4.2 dtype: int64
-
__init__
(**kwargs)¶ Creates a new instance of MeanOperator
- Parameters
kwargs – Arguments to pandas pd.mean function
-