dask_expr._collection.DataFrame.rolling

dask_expr._collection.DataFrame.rolling

DataFrame.rolling(window, **kwargs)

Provides rolling transformations.

Parameters
windowint, str, offset

Size of the moving window. This is the number of observations used for calculating the statistic. When not using a DatetimeIndex, the window size must not be so large as to span more than one adjacent partition. If using an offset or offset alias like ‘5D’, the data must have a DatetimeIndex

min_periodsint, default None

Minimum number of observations in window required to have a value (otherwise result is NA).

centerboolean, default False

Set the labels at the center of the window.

win_typestring, default None

Provide a window type. The recognized window types are identical to pandas.

axisint, str, None, default 0

This parameter is deprecated with pandas>=2.1.

Returns
a Rolling object on which to call a method to compute a statistic