Check whether all characters in each string are alphabetic. Returns ------- isalpha : array of bool Array of boolean values with the same shape as the original array. Examples -------- >>> da = xr.DataArray(["Mn", "H2O", "NaCl-"]
(self)
| 876 | return self._apply(func=lambda x: x.isalnum(), dtype=bool) |
| 877 | |
| 878 | def isalpha(self) -> T_DataArray: |
| 879 | """ |
| 880 | Check whether all characters in each string are alphabetic. |
| 881 | |
| 882 | Returns |
| 883 | ------- |
| 884 | isalpha : array of bool |
| 885 | Array of boolean values with the same shape as the original array. |
| 886 | |
| 887 | Examples |
| 888 | -------- |
| 889 | >>> da = xr.DataArray(["Mn", "H2O", "NaCl-"], dims="x") |
| 890 | >>> da |
| 891 | <xarray.DataArray (x: 3)> Size: 60B |
| 892 | array(['Mn', 'H2O', 'NaCl-'], dtype='<U5') |
| 893 | Dimensions without coordinates: x |
| 894 | >>> isalpha = da.str.isalpha() |
| 895 | >>> isalpha |
| 896 | <xarray.DataArray (x: 3)> Size: 3B |
| 897 | array([ True, False, False]) |
| 898 | Dimensions without coordinates: x |
| 899 | """ |
| 900 | return self._apply(func=lambda x: x.isalpha(), dtype=bool) |
| 901 | |
| 902 | def isdecimal(self) -> T_DataArray: |
| 903 | """ |