xarray.core.rolling_exp.RollingExp#
- class xarray.core.rolling_exp.RollingExp(obj, windows, window_type='span', min_weight=0.0)[source]#
Exponentially-weighted moving window object. Similar to EWM in pandas
- Parameters
windows (mapping of hashable 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
- Returns
RollingExp (
type
ofinput argument
)
Methods
__init__
(obj, windows[, window_type, min_weight])corr
(other)Exponentially weighted moving correlation.
cov
(other)Exponentially weighted moving covariance.
mean
([keep_attrs])Exponentially weighted moving average.
std
()Exponentially weighted moving standard deviation.
sum
([keep_attrs])Exponentially weighted moving sum.
var
()Exponentially weighted moving variance.