isnull
- UnitsAwareDataArray.isnull(keep_attrs: Optional[bool] = None)
Test each value in the array for whether it is a missing value.
- Returns
isnull – Same type and shape as object, but the dtype of the data is bool.
- Return type
DataArray or Dataset
See also
pandas.isnull
Examples
>>> array = xr.DataArray([1, np.nan, 3], dims="x") >>> array <xarray.DataArray (x: 3)> array([ 1., nan, 3.]) Dimensions without coordinates: x >>> array.isnull() <xarray.DataArray (x: 3)> array([False, True, False]) Dimensions without coordinates: x