xarray.core.rolling.DatasetCoarsen

class xarray.core.rolling.DatasetCoarsen(obj, windows, boundary, side, coord_func, keep_attrs)[source]
__init__(obj, windows, boundary, side, coord_func, keep_attrs)[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 trimed. If ‘pad’, NA will be padded.

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

  • coord_func (mapping from coordinate name to func.)

Returns

coarsen

Methods

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

Moving window object.

all(**kwargs)

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

any(**kwargs)

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

count(**kwargs)

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

max(**kwargs)

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

mean(**kwargs)

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

median(**kwargs)

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

min(**kwargs)

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

prod(**kwargs)

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

reduce(func, **kwargs)

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

std(**kwargs)

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

sum(**kwargs)

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

var(**kwargs)

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

Attributes

boundary

coord_func

keep_attrs

obj

side

trim_excess

windows