# xarray.Dataset.isnull

#### Dataset.isnull(keep_attrs=None)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/common.py#L1282-L1323)

Test each value in the array for whether it is a missing value.

* **Parameters:**
  **keep_attrs** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool) or [`None`](https://docs.python.org/3/builtins/constants.html#None), *optional*) – If True, the attributes (attrs) will be copied from
  the original object to the new one. If False, the new
  object will be returned without attributes.
* **Returns:**
  **isnull** ([`DataArray`](xarray.DataArray.html.md#xarray.DataArray) or [`Dataset`](xarray.Dataset.html.md#xarray.Dataset)) – Same type and shape as object, but the dtype of the data is bool.

#### SEE ALSO
[`pandas.isnull`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.isnull.html#pandas.isnull)

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('db6051a1-f5e8-4c8a-9497-ec632f8ca6bc','3f571bfb-6546-458a-b23b-5e869e13b665','327e0d48-684e-438b-b372-ebab95f25417','../lite/tree/../notebooks/index.html?path=4629b4ec_f430_4768_9d62_f3189b1cb801.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> array = xr.DataArray([1, np.nan, 3], dims="x")
>>> array
<xarray.DataArray (x: 3)> Size: 24B
array([ 1., nan,  3.])
Dimensions without coordinates: x
>>> array.isnull()
<xarray.DataArray (x: 3)> Size: 3B
array([False,  True, False])
Dimensions without coordinates: x
```

<div id="327e0d48-684e-438b-b372-ebab95f25417" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('db6051a1-f5e8-4c8a-9497-ec632f8ca6bc','327e0d48-684e-438b-b372-ebab95f25417')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('db6051a1-f5e8-4c8a-9497-ec632f8ca6bc','327e0d48-684e-438b-b372-ebab95f25417')">Open In Tab</button></div><div id="3f571bfb-6546-458a-b23b-5e869e13b665" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
