energy_analysis_toolbox.power.resample#

Function to resample a power series.

energy_analysis_toolbox.power.resample.to_freq(series: pd.Series[float], freq: str, origin: Literal['floor', 'ceil'] | Timestamp | None = None, last_step_duration: float | None = None) pd.Series[float][source]#

Resample a power series to a given frequency.

The last step duration of the resampled series is set to the frequency freq.

Note

Experimental: This function may change or be removed in a future release without warning.

Parameters:
  • series (pd.Series[float]) – a series of power.

  • 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_freq for more details.

  • last_step_duration (float, optional) – Duration of the last time-step in the volume series in (s). The default is None in which case the duration of the former-last time-step is used. See flow_rate_to_freq for more details.

Returns:

pd.Series[float] – the resampled power series.

See also

  • energy_analysis_toolbox.timeseries.resample.conservative. flow_rate_to_freq

  • energy_analysis_toolbox.timeseries.resample.conservative. flow_rate_conservative