The default behavior for adding and solving with noisemodels has changed from Pastas 1.5. Find more information here

pastas.timeseries_utils.resample#

resample(series, freq, closed='right', label='right', **kwargs)[source]#

Resample time-series data.

Convenience method for frequency conversion and resampling of time series. This function is a wrapper around Pandas’ resample function with some logical Pastas defaults. In Pastas, we assume the timestamp is at the end of the period that belongs to each measurement. For more information on this read the example notebook on preprocessing time series.

Parameters
  • series (pandas Series) – Time series. The index must be a datetime-like index (DatetimeIndex, PeriodIndex, or TimedeltaIndex).

  • freq (str) – Frequency string.

  • closed (str, default 'right') – Which side/end of bin interval is closed.

  • label (str, default 'right') – Which bin edge label to label bucket with.

  • **kwargs (dict) –

Returns

pandas Resampler object which can be manipulated using methods such as: ‘.interpolate()’, ‘.mean()’, ‘.max()’ etc. For all options see: https://pandas.pydata.org/docs/reference/resampling.html

Return type

Resampler