Convert strings in the array to uppercase. Returns ------- uppered : same type as values Examples -------- >>> da = xr.DataArray(["temperature", "HuMiDiTy"], dims="x") >>> da Size: 88B array(
(self)
| 766 | return self._apply(func=lambda x: x.title()) |
| 767 | |
| 768 | def upper(self) -> T_DataArray: |
| 769 | """ |
| 770 | Convert strings in the array to uppercase. |
| 771 | |
| 772 | Returns |
| 773 | ------- |
| 774 | uppered : same type as values |
| 775 | |
| 776 | Examples |
| 777 | -------- |
| 778 | >>> da = xr.DataArray(["temperature", "HuMiDiTy"], dims="x") |
| 779 | >>> da |
| 780 | <xarray.DataArray (x: 2)> Size: 88B |
| 781 | array(['temperature', 'HuMiDiTy'], dtype='<U11') |
| 782 | Dimensions without coordinates: x |
| 783 | >>> uppered = da.str.upper() |
| 784 | >>> uppered |
| 785 | <xarray.DataArray (x: 2)> Size: 88B |
| 786 | array(['TEMPERATURE', 'HUMIDITY'], dtype='<U11') |
| 787 | Dimensions without coordinates: x |
| 788 | """ |
| 789 | return self._apply(func=lambda x: x.upper()) |
| 790 | |
| 791 | def casefold(self) -> T_DataArray: |
| 792 | """ |