đŸŸ Xarray is now 10 years old! 🎉

xarray.core.rolling.DatasetCoarsen

xarray.core.rolling.DatasetCoarsen#

class xarray.core.rolling.DatasetCoarsen(obj, windows, boundary, side, coord_func)[source]#
__init__(obj, windows, boundary, side, coord_func)[source]#

Moving window object.

Parameters:
  • obj (Dataset or DataArray) – Object to window.

  • windows (mapping of hashable to int) – 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.

  • boundary ({"exact", "trim", "pad"}) – If ‘exact’, a ValueError will be raised if dimension size is not a multiple of window size. If ‘trim’, the excess indexes are trimmed. If ‘pad’, NA will be padded.

  • side ('left' or 'right' or mapping from dimension to 'left' or 'right')

  • coord_func (function (name) or mapping from coordinate name to function (name).)

Returns:

coarsen

Methods

__init__(obj, windows, boundary, side, ...)

Moving window object.

all([keep_attrs])

Reduce this DatasetCoarsen's data by applying all along some dimension(s).

any([keep_attrs])

Reduce this DatasetCoarsen's data by applying any along some dimension(s).

construct([window_dim, keep_attrs])

Convert this Coarsen object to a DataArray or Dataset, where the coarsening dimension is split or reshaped to two new dimensions.

count([keep_attrs])

Reduce this DatasetCoarsen's data by applying count along some dimension(s).

max([keep_attrs])

Reduce this DatasetCoarsen's data by applying max along some dimension(s).

mean([keep_attrs])

Reduce this DatasetCoarsen's data by applying mean along some dimension(s).

median([keep_attrs])

Reduce this DatasetCoarsen's data by applying median along some dimension(s).

min([keep_attrs])

Reduce this DatasetCoarsen's data by applying min along some dimension(s).

prod([keep_attrs])

Reduce this DatasetCoarsen's data by applying prod along some dimension(s).

reduce(func[, keep_attrs])

Reduce the items in this group by applying func along some dimension(s).

std([keep_attrs])

Reduce this DatasetCoarsen's data by applying std along some dimension(s).

sum([keep_attrs])

Reduce this DatasetCoarsen's data by applying sum along some dimension(s).

var([keep_attrs])

Reduce this DatasetCoarsen's data by applying var along some dimension(s).

Attributes

boundary

coord_func

obj

side

trim_excess

windows