DataArray.resample(freq=None, dim=None, how=None, skipna=None, closed=None, label=None, base=0, keep_attrs=False, **indexer)

Returns a Resample object for performing resampling operations.

Handles both downsampling and upsampling. Upsampling with filling is not supported; if any intervals contain no values from the original object, they will be given the value NaN.


skipna : bool, optional

Whether to skip missing values when aggregating in downsampling.

closed : ‘left’ or ‘right’, optional

Side of each interval to treat as closed.

label : ‘left or ‘right’, optional

Side of each interval to use for labeling.

base : int, optional

For frequencies that evenly subdivide 1 day, the “origin” of the aggregated intervals. For example, for ‘24H’ frequency, base could range from 0 through 23.

keep_attrs : bool, optional

If True, the object’s attributes (attrs) will be copied from the original object to the new one. If False (default), the new object will be returned without attributes.

**indexer : {dim: freq}

Dictionary with a key indicating the dimension name to resample over and a value corresponding to the resampling frequency.


resampled : same type as caller

This object resampled.