# xarray.DataArray.str.isdigit

#### DataArray.str.isdigit()[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L937-L959)

Check whether all characters in each string are digits.

* **Returns:**
  **isdigit** ([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('ab3a98e9-8f1b-4e1c-8fdd-7a8708414326','aa342579-ddad-4a13-b625-4cf17103f8f0','6f3fb23c-c0a7-4689-9347-925519f3fa96','../lite/tree/../notebooks/index.html?path=67767eb1_71b3_4252_8e53_c2825eeebef0.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> da = xr.DataArray(["123", "1.2", "0", "CO2", "NaCl"], dims="x")
>>> da
<xarray.DataArray (x: 5)> Size: 80B
array(['123', '1.2', '0', 'CO2', 'NaCl'], dtype='<U4')
Dimensions without coordinates: x
>>> isdigit = da.str.isdigit()
>>> isdigit
<xarray.DataArray (x: 5)> Size: 5B
array([ True, False,  True, False, False])
Dimensions without coordinates: x
```

<div id="6f3fb23c-c0a7-4689-9347-925519f3fa96" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('ab3a98e9-8f1b-4e1c-8fdd-7a8708414326','6f3fb23c-c0a7-4689-9347-925519f3fa96')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('ab3a98e9-8f1b-4e1c-8fdd-7a8708414326','6f3fb23c-c0a7-4689-9347-925519f3fa96')">Open In Tab</button></div><div id="aa342579-ddad-4a13-b625-4cf17103f8f0" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
