# xarray.DataArray.str.isalnum

#### DataArray.str.isalnum()[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L876-L899)

Check whether all characters in each string are alphanumeric.

* **Returns:**
  **isalnum** ([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('613f61bf-4fff-4b05-b0a8-45c820a21add','1dd6629e-de2e-4608-8028-06482f7aa2b2','2547416c-a426-4d52-8591-4d3ad6b43758','../lite/tree/../notebooks/index.html?path=a5c0dfc1_48bb_4da3_9713_2ba06f9dd7b1.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> da = xr.DataArray(["H2O", "NaCl-"], dims="x")
>>> da
<xarray.DataArray (x: 2)> Size: 40B
array(['H2O', 'NaCl-'], dtype='<U5')
Dimensions without coordinates: x
>>> isalnum = da.str.isalnum()
>>> isalnum
<xarray.DataArray (x: 2)> Size: 2B
array([ True, False])
Dimensions without coordinates: x
```

<div id="2547416c-a426-4d52-8591-4d3ad6b43758" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('613f61bf-4fff-4b05-b0a8-45c820a21add','2547416c-a426-4d52-8591-4d3ad6b43758')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('613f61bf-4fff-4b05-b0a8-45c820a21add','2547416c-a426-4d52-8591-4d3ad6b43758')">Open In Tab</button></div><div id="1dd6629e-de2e-4608-8028-06482f7aa2b2" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
