modelhub.ModelHub.time_agg
time_agg
(data, time_aggregation=None)Formats the moment column in the DataFrame, returns a SeriesString.
Can be used to aggregate to different time intervals, ie day, month etc.
Parameters
data
(bach.dataframe.DataFrame) –bach.DataFrame
to apply the method on.time_aggregation
(Optional[str]) – if None, it usestime_aggregation
set from the ModelHub. Use any template for aggregation based on 1989 C standard format codes: https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes ie.time_aggregation=='%Y-%m-%d'
aggregates by date.
Returns
SeriesString.