lisa.datautils.series_rolling_apply#
- lisa.datautils.series_rolling_apply(series, func, window, window_float_index=True, center=False)[source]#
Apply a function on a rolling window of a series.
- Returns:
The series of results of the function.
- Parameters:
series (pandas.Series) – Series to act on.
func (collections.abc.Callable) – Function to apply on each window. It must take a
pandas.Seriesas only parameter and return one value.window (float) – Rolling window width in seconds.
center (bool) – Label values generated by
funcwith the center of the window, rather than the highest index in it.window_float_index (bool) – If
True, the series passed tofuncwill be of typepandas.Index(float64), in nanoseconds. Disabling is recommended if the index is not used byfuncsince it will remove the need for a conversion.