module timeseries.agg#

Short summary#

module mlinsights.timeseries.agg

Data aggregation for timeseries.

source on GitHub

Functions#

function

truncated documentation

_get_column_name

Returns a unique column name not in the existing dataframe.

aggregate_timeseries

Aggregates timeseries assuming the data is in a dataframe.

Documentation#

Data aggregation for timeseries.

source on GitHub

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

source on GitHub

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

source on GitHub