# xarray.Dataset.rolling

#### Dataset.rolling(dim=None, min_periods=None, center=False, \*\*window_kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/dataset.py#L10568-L10607)

Rolling window object for Datasets.

* **Parameters:**
  * **dim** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict), *optional*) – Mapping from the dimension name to create the rolling iterator
    along (e.g. time) to its moving window size.
  * **min_periods** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *default*: [`None`](https://docs.python.org/3/builtins/constants.html#None)) – Minimum number of observations in window required to have a value
    (otherwise result is NA). The default, None, is equivalent to
    setting min_periods equal to the size of the window.
  * **center** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool) or `Mapping` to [`int`](https://docs.python.org/3/builtins/functions.html#int), *default*: [`False`](https://docs.python.org/3/builtins/constants.html#False)) – Set the labels at the center of the window. The default, False,
    sets the labels at the right edge of the window.
  * **\*\*window_kwargs** (**optional**) – The keyword arguments form of `dim`.
    One of dim or window_kwargs must be provided.
* **Returns:**
  [`computation.rolling.DatasetRolling`](xarray.computation.rolling.DatasetRolling.html.md#xarray.computation.rolling.DatasetRolling)

#### SEE ALSO
[`Dataset.cumulative`](xarray.Dataset.cumulative.html.md#xarray.Dataset.cumulative), [`DataArray.rolling`](xarray.DataArray.rolling.html.md#xarray.DataArray.rolling), [`DataArray.rolling_exp`](xarray.DataArray.rolling_exp.html.md#xarray.DataArray.rolling_exp)
