timeatlas.time_series.TimeSeries.group_by¶

TimeSeries.
group_by
(freq: str, method: Optional[str] = 'mean') → timeatlas.time_series.time_series.TimeSeries¶ Groups values by a frequency.
This method is quite similar to resample with the difference that it gives the guaranty that the timestamps are full values. e.g. 20190101 08:00:00.
Resample could make values spaced by 1 min but every x sec e.g. [20190101 08:00:33, 20190101 08:01:33], which isn’t convenient for further index merging operations.
The function has different aggregations methods taken from Pandas groupby aggregations[1]. By default, it’ll take the mean of the defined freq bucket.
[1] https://pandas.pydata.org/pandasdocs/stable/user_guide/groupby.html#aggregation
 Parameters
freq – string offset alias of a frequency
method – string of the Pandas aggregation function.
 Returns
TimeSeries