DataFrame.
resample
Resample time-series data.
Convenience method for frequency conversion and resampling of time series. The object must have a datetime-like index (only support DatetimeIndex for now), or the caller must pass the label of a datetime-like series/index to the on keyword parameter.
on
New in version 3.4.0.
The offset string or object representing target conversion. Currently, supported units are {‘Y’, ‘A’, ‘M’, ‘D’, ‘H’, ‘T’, ‘MIN’, ‘S’}.
Which side of bin interval is closed. The default is ‘left’ for all frequency offsets except for ‘A’, ‘Y’ and ‘M’ which all have a default of ‘right’.
Which bin edge label to label bucket with. The default is ‘left’ for all frequency offsets except for ‘A’, ‘Y’ and ‘M’ which all have a default of ‘right’.
For a DataFrame, column to use instead of index for resampling. Column must be datetime-like.
See also
Series.resample
Resample a Series.
groupby
Group by mapping, function, label, or list of labels.