Check whether all characters in each string are digits. Returns ------- isdigit : array of bool Array of boolean values with the same shape as the original array. Examples -------- >>> da = xr.DataArray(["123", "1.2", "0", "CO2",
(self)
| 924 | return self._apply(func=lambda x: x.isdecimal(), dtype=bool) |
| 925 | |
| 926 | def isdigit(self) -> T_DataArray: |
| 927 | """ |
| 928 | Check whether all characters in each string are digits. |
| 929 | |
| 930 | Returns |
| 931 | ------- |
| 932 | isdigit : array of bool |
| 933 | Array of boolean values with the same shape as the original array. |
| 934 | |
| 935 | Examples |
| 936 | -------- |
| 937 | >>> da = xr.DataArray(["123", "1.2", "0", "CO2", "NaCl"], dims="x") |
| 938 | >>> da |
| 939 | <xarray.DataArray (x: 5)> Size: 80B |
| 940 | array(['123', '1.2', '0', 'CO2', 'NaCl'], dtype='<U4') |
| 941 | Dimensions without coordinates: x |
| 942 | >>> isdigit = da.str.isdigit() |
| 943 | >>> isdigit |
| 944 | <xarray.DataArray (x: 5)> Size: 5B |
| 945 | array([ True, False, True, False, False]) |
| 946 | Dimensions without coordinates: x |
| 947 | """ |
| 948 | return self._apply(func=lambda x: x.isdigit(), dtype=bool) |
| 949 | |
| 950 | def islower(self) -> T_DataArray: |
| 951 | """ |