xarray.Dataset.coarsen#
- Dataset.coarsen(dim=None, boundary='exact', side='left', coord_func='mean', **window_kwargs)[source]#
Coarsen object for Datasets.
- Parameters:
dim (mapping of hashable to
int
, optional) – Mapping from the dimension name to the window size.boundary (
{"exact", "trim", "pad"}
, default:"exact"
) – If ‘exact’, a ValueError will be raised if dimension size is not a multiple of the window size. If ‘trim’, the excess entries are dropped. If ‘pad’, NA will be padded.side (
{"left", "right"}
or mapping ofstr
to{"left", "right"}
, default:"left"
)coord_func (
str
or mapping of hashable tostr
, default:"mean"
) – function (name) that is applied to the coordinates, or a mapping from coordinate name to function (name).
- Returns:
See also