xarray.DataArray.str.upper#
- DataArray.str.upper()[source]#
Convert strings in the array to uppercase.
- Returns:
uppered (
same type as values
)
Examples
>>> da = xr.DataArray(["temperature", "HuMiDiTy"], dims="x") >>> da <xarray.DataArray (x: 2)> Size: 88B array(['temperature', 'HuMiDiTy'], dtype='<U11') Dimensions without coordinates: x >>> uppered = da.str.upper() >>> uppered <xarray.DataArray (x: 2)> Size: 88B array(['TEMPERATURE', 'HUMIDITY'], dtype='<U11') Dimensions without coordinates: x