xarray.Dataset.rolling_exp

Dataset.rolling_exp(window: Optional[Mapping[Hashable, int]] = None, window_type: str = 'span', **window_kwargs)

Exponentially-weighted moving window. Similar to EWM in pandas

Requires the optional Numbagg dependency.

Parameters:

window : A single mapping from a dimension name to window value,

optional

dim : str

Name of the dimension to create the rolling exponential window along (e.g., time).

window : int

Size of the moving window. The type of this is specified in window_type

window_type : str, one of [‘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/generated/pandas.DataFrame.ewm.html

**window_kwargs : optional

The keyword arguments form of window. One of window or window_kwargs must be provided.