# 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('0f6d0b65-d0fc-4dae-b601-393b59802297','e53e60bf-621b-4e3c-a904-ca65446303a8','136ce8d5-3474-4630-b638-4396e830f3d7','../lite/tree/../notebooks/index.html?path=4d47ef3e_bec1_4dc9_aa4a_bb906facdc9e.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="136ce8d5-3474-4630-b638-4396e830f3d7" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('0f6d0b65-d0fc-4dae-b601-393b59802297','136ce8d5-3474-4630-b638-4396e830f3d7')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('0f6d0b65-d0fc-4dae-b601-393b59802297','136ce8d5-3474-4630-b638-4396e830f3d7')">Open In Tab</button></div><div id="e53e60bf-621b-4e3c-a904-ca65446303a8" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
