Provides rolling transformations. Parameters ---------- window : int, 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 b
(self, window, **kwargs)
| 994 | return Resampler(self, rule, closed=closed, label=label) |
| 995 | |
| 996 | def rolling(self, window, **kwargs): |
| 997 | """Provides rolling transformations. |
| 998 | |
| 999 | Parameters |
| 1000 | ---------- |
| 1001 | window : int, str, offset |
| 1002 | Size of the moving window. This is the number of observations used |
| 1003 | for calculating the statistic. When not using a ``DatetimeIndex``, |
| 1004 | the window size must not be so large as to span more than one |
| 1005 | adjacent partition. If using an offset or offset alias like '5D', |
| 1006 | the data must have a ``DatetimeIndex`` |
| 1007 | min_periods : int, default None |
| 1008 | Minimum number of observations in window required to have a value |
| 1009 | (otherwise result is NA). |
| 1010 | center : boolean, default False |
| 1011 | Set the labels at the center of the window. |
| 1012 | win_type : string, default None |
| 1013 | Provide a window type. The recognized window types are identical |
| 1014 | to pandas. |
| 1015 | axis : int, str, None, default 0 |
| 1016 | This parameter is deprecated with ``pandas>=2.1``. |
| 1017 | |
| 1018 | Returns |
| 1019 | ------- |
| 1020 | a Rolling object on which to call a method to compute a statistic |
| 1021 | """ |
| 1022 | from dask.dataframe.dask_expr._rolling import Rolling |
| 1023 | |
| 1024 | return Rolling(self, window, **kwargs) |
| 1025 | |
| 1026 | @insert_meta_param_description(pad=12) |
| 1027 | def map_partitions( |