# xarray.core.accessor_str.StringAccessor.isalnum

#### StringAccessor.isalnum()[[source]](https://github.com/pydata/xarray/blob/v2026.09.0/xarray/core/accessor_str.py#L854-L876)

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('8ef229c8-25ad-44cd-952f-3f25d7cd6b25','1a319c0f-613c-406a-b83b-69b899dc7d61','2f1e898f-550d-4fb5-93ec-3435b4b90fc5','../lite/tree/../notebooks/index.html?path=33e71086_82b4_44a6_a94f_869b2f6d16bc.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="2f1e898f-550d-4fb5-93ec-3435b4b90fc5" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('8ef229c8-25ad-44cd-952f-3f25d7cd6b25','2f1e898f-550d-4fb5-93ec-3435b4b90fc5')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('8ef229c8-25ad-44cd-952f-3f25d7cd6b25','2f1e898f-550d-4fb5-93ec-3435b4b90fc5')">Open In Tab</button></div><div id="1a319c0f-613c-406a-b83b-69b899dc7d61" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
