xarray.core.resample.DataArrayResample.where

xarray.core.resample.DataArrayResample.where#

DataArrayResample.where(cond, other=<NA>)[source]#

Return elements from self or other depending on cond.

Parameters
  • cond (DataArray or Dataset) – Locations at which to preserve this objects values. dtypes have to be bool

  • other (scalar, DataArray or Dataset, optional) – Value to use for locations in this object where cond is False. By default, inserts missing values.

Returns

same type as the grouped object

See also

Dataset.where