pastas.utils.timestep_weighted_resample_fast¶
- timestep_weighted_resample_fast(series0, freq)[source]¶
Resample a time series to a new frequency, using an overlapping period weighted average.
The original series does not have to be equidistant.
It is assumed the series consists of measurements that describe an intensity at the end of the period for which they apply. Therefore, when upsampling, the values are uniformly spread over the new timestep (like bfill).
Compared to the resample methods in Pandas, this method is more accurate for non-equidistant series. It is slower than Pandas (but faster then the original timestep_weighted_resample).
- Parameters
series0 (pandas.Series) – original series to be resampled
freq (str) – a Pandas frequency string
- Returns
series – resampled series
- Return type