# xarray.DataArray.str.isalnum

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

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('6b25d6c8-2bf3-401b-881b-52ee433d63b6','60a54af3-7d1c-48b3-b1d0-ccf5ba0a1e55','f76a4c1e-b3da-4a1f-941a-218fa8bc1b92','../lite/tree/../notebooks/index.html?path=84b8a23f_7685_4082_81a5_c58bae333cc2.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="f76a4c1e-b3da-4a1f-941a-218fa8bc1b92" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('6b25d6c8-2bf3-401b-881b-52ee433d63b6','f76a4c1e-b3da-4a1f-941a-218fa8bc1b92')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('6b25d6c8-2bf3-401b-881b-52ee433d63b6','f76a4c1e-b3da-4a1f-941a-218fa8bc1b92')">Open In Tab</button></div><div id="60a54af3-7d1c-48b3-b1d0-ccf5ba0a1e55" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
