energy_analysis_toolbox.energy.resample#
Function to resample a energy series.
- energy_analysis_toolbox.energy.resample.to_freq(series: pd.Series[float], freq: str, origin: None | Literal['floor', 'ceil'] | Timestamp = None, last_step_duration: float | None = None) pd.Series[float][source]#
Resample an energy series to a given frequency.
The last step duration of the resampled series is set to the frequency
freq.- Parameters:
series (pd.Series[float]) – a series of energy.
freq (str) – the frequency to resample to.
origin ({"floor", "ceil", pd.Timestamp}, optional) – the origin of the resampling, by default None. See
flow_rate_to_freqfor more details.last_step_duration (float, optional) – Duration of the last time-step in the
volumeseries in (s). The default isNonein which case the duration of the former-last time-step is used. Seeflow_rate_to_freqfor more details.
- Returns:
pd.Series[float] – the resampled energy series.
See also
energy_analysis_toolbox.timeseries.resample. conservative.volume_to_freqenergy_analysis_toolbox.timeseries.resample. conservative.volume_conservative