MCPcopy
hub / github.com/pydata/xarray / lower

Method lower

xarray/core/accessor_str.py:698–719  ·  view source on GitHub ↗

Convert strings in the array to lowercase. Returns ------- lowered : same type as values Examples -------- >>> da = xr.DataArray(["Temperature", "PRESSURE"], dims="x") >>> da Size: 88B array(

(self)

Source from the content-addressed store, hash-verified

696 return self._apply(func=lambda x: x.capitalize())
697
698 def lower(self) -> T_DataArray:
699 """
700 Convert strings in the array to lowercase.
701
702 Returns
703 -------
704 lowered : same type as values
705
706 Examples
707 --------
708 >>> da = xr.DataArray(["Temperature", "PRESSURE"], dims="x")
709 >>> da
710 <xarray.DataArray (x: 2)> Size: 88B
711 array(['Temperature', 'PRESSURE'], dtype='<U11')
712 Dimensions without coordinates: x
713 >>> lowered = da.str.lower()
714 >>> lowered
715 <xarray.DataArray (x: 2)> Size: 88B
716 array(['temperature', 'pressure'], dtype='<U11')
717 Dimensions without coordinates: x
718 """
719 return self._apply(func=lambda x: x.lower())
720
721 def swapcase(self) -> T_DataArray:
722 """

Callers 12

_is_standard_calendarFunction · 0.80
_as_sparseMethod · 0.80
_diff_mapping_reprFunction · 0.80
guess_can_openMethod · 0.80
_is_likely_dap_urlFunction · 0.80
_get_zarr_dims_and_attrsFunction · 0.80
get_attrsMethod · 0.80
test_case_bytesFunction · 0.80
test_case_strFunction · 0.80
test_empty_str_methodsFunction · 0.80

Calls 1

_applyMethod · 0.95

Tested by 3

test_case_bytesFunction · 0.64
test_case_strFunction · 0.64
test_empty_str_methodsFunction · 0.64