# xarray.core.resample.DataArrayResample.where

#### DataArrayResample.where(cond, other=<NA>)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/groupby.py#L1505-L1524)

Return elements from self or other depending on cond.

* **Parameters:**
  * **cond** ([`DataArray`](xarray.DataArray.html.md#xarray.DataArray) or [`Dataset`](xarray.Dataset.html.md#xarray.Dataset)) – Locations at which to preserve this objects values. dtypes have to be bool
  * **other** ([scalar](../user-guide/terminology.html.md#term-scalar), [`DataArray`](xarray.DataArray.html.md#xarray.DataArray) or [`Dataset`](xarray.Dataset.html.md#xarray.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`
