# xarray.computation.rolling_exp.RollingExp

### *class* xarray.computation.rolling_exp.RollingExp(obj, windows, window_type='span', min_weight=0.0)[[source]](https://github.com/pydata/xarray/blob/main/xarray/computation/rolling_exp.py#L52-L289)

Exponentially-weighted moving window object.
Similar to EWM in pandas

* **Parameters:**
  * **obj** ([`Dataset`](xarray.Dataset.html.md#xarray.Dataset) or [`DataArray`](xarray.DataArray.html.md#xarray.DataArray)) – Object to window.
  * **windows** ([mapping](https://docs.python.org/3/glossary.html#term-mapping) of [hashable](../user-guide/terminology.html.md#term-name) to `int (or float for alpha type)`) – 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)
* **Returns:**
  **RollingExp** ([`type`](https://docs.python.org/3/builtins/functions.html#type) of `input argument`)

#### \_\_init_\_(obj, windows, window_type='span', min_weight=0.0)[[source]](https://github.com/pydata/xarray/blob/main/xarray/computation/rolling_exp.py#L74-L95)

### Methods

| [`__init__`](#xarray.computation.rolling_exp.RollingExp.__init__)(obj, windows[, window_type, min_weight])                 |                                                   |
|--------------------------------------------------------------------------------------------------------------------|---------------------------------------------------|
| `corr`(other)                                                                                                      | Exponentially weighted moving correlation.        |
| `cov`(other)                                                                                                       | Exponentially weighted moving covariance.         |
| [`mean`](xarray.computation.rolling_exp.RollingExp.mean.html.md#xarray.computation.rolling_exp.RollingExp.mean)([keep_attrs]) | Exponentially weighted moving average.            |
| `std`()                                                                                                            | Exponentially weighted moving standard deviation. |
| [`sum`](xarray.computation.rolling_exp.RollingExp.sum.html.md#xarray.computation.rolling_exp.RollingExp.sum)([keep_attrs])   | Exponentially weighted moving sum.                |
| `var`()                                                                                                            | Exponentially weighted moving variance.           |
