# xarray.core.accessor_str.StringAccessor.isspace

#### StringAccessor.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('cbf714c7-9bae-47cd-93e4-faf53811fd10','acf17ee9-e6a0-425b-9fee-055427674eba','c5030325-7b32-4c33-88c9-1759aee06d9b','../lite/tree/../notebooks/index.html?path=dab02439_0ad5_403a_9123_244cf84d47f5.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="c5030325-7b32-4c33-88c9-1759aee06d9b" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('cbf714c7-9bae-47cd-93e4-faf53811fd10','c5030325-7b32-4c33-88c9-1759aee06d9b')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('cbf714c7-9bae-47cd-93e4-faf53811fd10','c5030325-7b32-4c33-88c9-1759aee06d9b')">Open In Tab</button></div><div id="acf17ee9-e6a0-425b-9fee-055427674eba" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
