# 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('e9c0a9c4-3121-48eb-8803-01c9c7cca67c','29e2ffc4-b919-4ee2-8218-1e843530c3cd','9d306979-3481-40cc-95ab-eed691c42c79','../lite/tree/../notebooks/index.html?path=89e77bd1_36f1_4b83_9fed_682d35536333.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="9d306979-3481-40cc-95ab-eed691c42c79" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('e9c0a9c4-3121-48eb-8803-01c9c7cca67c','9d306979-3481-40cc-95ab-eed691c42c79')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('e9c0a9c4-3121-48eb-8803-01c9c7cca67c','9d306979-3481-40cc-95ab-eed691c42c79')">Open In Tab</button></div><div id="29e2ffc4-b919-4ee2-8218-1e843530c3cd" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
