# xarray.DataArray.str.isspace

#### DataArray.str.isspace()[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L1010-L1032)

Check whether all characters in each string are spaces.

* **Returns:**
  **isspace** ([array](https://numpy.org/doc/stable/glossary.html#term-array) of [`bool`](https://docs.python.org/3/builtins/functions.html#bool)) – Array of boolean values with the same shape as the original array.

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('2542a024-3143-4243-a4f1-428bf3a21787','a22f2fd7-ab5e-4ada-91f7-2ae18e3a740f','4c83fdf7-a83e-4892-9099-10c8f3666bf6','../lite/tree/../notebooks/index.html?path=48c6bd37_84cb_4f09_9f6a_6ade5183822a.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> da = xr.DataArray(["", " ", "\t", "\n"], dims="x")
>>> da
<xarray.DataArray (x: 4)> Size: 16B
array(['', ' ', '\t', '\n'], dtype='<U1')
Dimensions without coordinates: x
>>> isspace = da.str.isspace()
>>> isspace
<xarray.DataArray (x: 4)> Size: 4B
array([False,  True,  True,  True])
Dimensions without coordinates: x
```

<div id="4c83fdf7-a83e-4892-9099-10c8f3666bf6" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('2542a024-3143-4243-a4f1-428bf3a21787','4c83fdf7-a83e-4892-9099-10c8f3666bf6')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('2542a024-3143-4243-a4f1-428bf3a21787','4c83fdf7-a83e-4892-9099-10c8f3666bf6')">Open In Tab</button></div><div id="a22f2fd7-ab5e-4ada-91f7-2ae18e3a740f" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
