module timeseries.agg
#
Short summary#
module mlinsights.timeseries.agg
Data aggregation for timeseries.
Functions#
function |
truncated documentation |
---|---|
Returns a unique column name not in the existing dataframe. |
|
Aggregates timeseries assuming the data is in a dataframe. |
Documentation#
Data aggregation for timeseries.
- mlinsights.timeseries.agg._get_column_name(df, name='agg')#
Returns a unique column name not in the existing dataframe.
- Parameters:
df – dataframe
name – prefix
- Returns:
new column name
- mlinsights.timeseries.agg.aggregate_timeseries(df, index='time', values='y', unit='half-hour', agg='sum', per=None)#
Aggregates timeseries assuming the data is in a dataframe.
- Parameters:
df – dataframe
index – time column
values – value or values column
unit – aggregate over a specific period
sum – kind of aggregation
per – second aggregation, per week…
- Returns:
aggregated values