def rolling(self: FrameLike, window: int, min_periods: Optional[int]=None) -> 'Rolling[FrameLike]':
    "\n        Provide rolling transformations.\n\n        .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas.\n            Unlike pandas, NA is also counted as the period. This might be changed\n            in the near future.\n\n        Parameters\n        ----------\n        window : int, or offset\n            Size of the moving window.\n            This is the number of observations used for calculating the statistic.\n            Each window will be a fixed size.\n\n        min_periods : int, default None\n            Minimum number of observations in window required to have a value\n            (otherwise result is NA).\n            For a window that is specified by an offset, min_periods will default to 1.\n            Otherwise, min_periods will default to the size of the window.\n\n        Returns\n        -------\n        a Window sub-classed for the particular operation\n        "
    from pyspark.pandas.window import Rolling
    return Rolling(self, window=window, min_periods=min_periods)
Provide rolling transformations.

.. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas.
    Unlike pandas, NA is also counted as the period. This might be changed
    in the near future.

Parameters
----------
window : int, or offset
    Size of the moving window.
    This is the number of observations used for calculating the statistic.
    Each window will be a fixed size.

min_periods : int, default None
    Minimum number of observations in window required to have a value
    (otherwise result is NA).
    For a window that is specified by an offset, min_periods will default to 1.
    Otherwise, min_periods will default to the size of the window.

Returns
-------
a Window sub-classed for the particular operation
def rolling(self: FrameLike, window: int, min_periods: Optional[int]=None) -> 'Rolling[FrameLike]':
    "\n        Provide rolling transformations.\n\n        .. note:: 'min_periods' in pandas-on-Spark works as a fixed window size unlike pandas.\n            Unlike pandas, NA is also counted as the period. This might be changed\n            in the near future.\n\n        Parameters\n        ----------\n        window : int, or offset\n            Size of the moving window.\n            This is the number of observations used for calculating the statistic.\n            Each window will be a fixed size.\n\n        min_periods : int, default None\n            Minimum number of observations in window required to have a value\n            (otherwise result is NA).\n            For a window that is specified by an offset, min_periods will default to 1.\n            Otherwise, min_periods will default to the size of the window.\n\n        Returns\n        -------\n        a Window sub-classed for the particular operation\n        "
    from pyspark.pandas.window import Rolling
    return Rolling(self, window=window, min_periods=min_periods)