lair.clock.diurnal#
- lair.clock.diurnal(data, freq='1h', statistic='mean', method='floor')[source]#
Aggregate the data to the specified frequency and compute the statistic for each group.
- Parameters:
data (pd.DataFrame) – The data to aggregate. Panda DataFrame with a DateTimeIndex.
freq (str) – The frequency to aggregate the data to. Sub-Daily.
statistic (str or list of str, optional) – The statistic to compute for each group. Default is ‘mean’.
method (one of 'floor', 'ceil', 'round') – The method to use to round the index to the nearest freq.
- Returns:
pd.DataFrame – The aggregated data.