xarray.core.resample.DataArrayResample

class xarray.core.resample.DataArrayResample(*args, **kwargs)

DataArrayGroupBy object specialized to time resampling operations over a specified dimension

__init__(*args, **kwargs)

Create a GroupBy object

Parameters
objDataset or DataArray

Object to group.

groupDataArray

Array with the group values.

squeezeboolean, optional

If “group” is a coordinate of object, squeeze controls whether the subarrays have a dimension of length 1 along that coordinate or if the dimension is squeezed out.

grouperpd.Grouper, optional

Used for grouping values along the group array.

binsarray-like, optional

If bins is specified, the groups will be discretized into the specified bins by pandas.cut.

cut_kwargsdict, optional

Extra keyword arguments to pass to pandas.cut

Methods

__init__(*args, **kwargs)

Create a GroupBy object

all([dim, axis, keep_attrs])

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

any([dim, axis, keep_attrs])

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

apply(func[, shortcut, args])

Apply a function over each array in the group and concatenate them together into a new array.

argmax([dim, axis, skipna, keep_attrs])

Reduce this DataArrayResample’s data by applying argmax along some dimension(s).

argmin([dim, axis, skipna, keep_attrs])

Reduce this DataArrayResample’s data by applying argmin along some dimension(s).

asfreq()

Return values of original object at the new up-sampling frequency; essentially a re-index with new times set to NaN.

assign_coords(**kwargs)

Assign coordinates by group.

backfill([tolerance])

Backward fill new values at up-sampled frequency.

bfill([tolerance])

Backward fill new values at up-sampled frequency.

count([dim, axis, keep_attrs])

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

ffill([tolerance])

Forward fill new values at up-sampled frequency.

fillna(value)

Fill missing values in this object by group.

first([skipna, keep_attrs])

Return the first element of each group along the group dimension

interpolate([kind])

Interpolate up-sampled data using the original data as knots.

last([skipna, keep_attrs])

Return the last element of each group along the group dimension

max([dim, axis, skipna, keep_attrs])

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

mean([dim, axis, skipna, keep_attrs])

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

median([dim, axis, skipna, keep_attrs])

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

min([dim, axis, skipna, keep_attrs])

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

nearest([tolerance])

Take new values from nearest original coordinate to up-sampled frequency coordinates.

pad([tolerance])

Forward fill new values at up-sampled frequency.

prod([dim, axis, skipna, keep_attrs])

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

reduce(func[, dim, axis, keep_attrs, shortcut])

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

std([dim, axis, skipna, keep_attrs])

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

sum([dim, axis, skipna, keep_attrs])

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

var([dim, axis, skipna, keep_attrs])

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

where(cond[, other])

Return elements from self or other depending on cond.

Attributes

groups