MCPcopy Index your code
hub / github.com/pydata/xarray / upper

Method upper

xarray/core/accessor_str.py:768–789  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 7

containsMethod · 0.95
test_case_bytesFunction · 0.80
test_case_strFunction · 0.80
test_empty_str_methodsFunction · 0.80
test_restrict_namesMethod · 0.80

Calls 1

_applyMethod · 0.95

Tested by 4

test_case_bytesFunction · 0.64
test_case_strFunction · 0.64
test_empty_str_methodsFunction · 0.64
test_restrict_namesMethod · 0.64