- DataFrame.rolling(window, min_periods=None, center=False, win_type=None, axis=0)¶
Provides rolling transformations.
- 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
Changed in version 0.15.0: Now accepts offsets and string offset aliases
- 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, default 0
- a Rolling object on which to call a method to compute a statistic