# xarray.Dataset.rolling_exp

#### Dataset.rolling_exp(window=None, window_type='span', \*\*window_kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/common.py#L881-L923)

Exponentially-weighted moving window.
Similar to EWM in pandas

Requires the optional Numbagg dependency.

* **Parameters:**
  * **window** ([mapping](https://docs.python.org/3/glossary.html#term-mapping) of [hashable](../user-guide/terminology.html.md#term-name) to [`int`](https://docs.python.org/3/builtins/functions.html#int), *optional*) – A mapping from the name of the dimension to create the rolling
    exponential window along (e.g. time) to the size of the moving window.
  * **window_type** (`{"span", "com", "halflife", "alpha"}`, *default*: `"span"`) – The format of the previously supplied window. Each is a simple
    numerical transformation of the others. Described in detail:
    [https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.ewm.html](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.ewm.html)
  * **\*\*window_kwargs** (**optional**) – The keyword arguments form of `window`.
    One of window or window_kwargs must be provided.

#### SEE ALSO
`core.rolling_exp.RollingExp`
