Check whether all characters in each string are numeric. Returns ------- isnumeric : array of bool Array of boolean values with the same shape as the original array. Examples -------- >>> da = xr.DataArray(["123", "2.3", "H2O", "
(self)
| 973 | return self._apply(func=lambda x: x.islower(), dtype=bool) |
| 974 | |
| 975 | def isnumeric(self) -> T_DataArray: |
| 976 | """ |
| 977 | Check whether all characters in each string are numeric. |
| 978 | |
| 979 | Returns |
| 980 | ------- |
| 981 | isnumeric : array of bool |
| 982 | Array of boolean values with the same shape as the original array. |
| 983 | |
| 984 | Examples |
| 985 | -------- |
| 986 | >>> da = xr.DataArray(["123", "2.3", "H2O", "NaCl-", "Mn"], dims="x") |
| 987 | >>> da |
| 988 | <xarray.DataArray (x: 5)> Size: 100B |
| 989 | array(['123', '2.3', 'H2O', 'NaCl-', 'Mn'], dtype='<U5') |
| 990 | Dimensions without coordinates: x |
| 991 | >>> isnumeric = da.str.isnumeric() |
| 992 | >>> isnumeric |
| 993 | <xarray.DataArray (x: 5)> Size: 5B |
| 994 | array([ True, False, False, False, False]) |
| 995 | Dimensions without coordinates: x |
| 996 | """ |
| 997 | return self._apply(func=lambda x: x.isnumeric(), dtype=bool) |
| 998 | |
| 999 | def isspace(self) -> T_DataArray: |
| 1000 | """ |