🍾 Xarray is now 10 years old! 🎉

xarray.DataArray.str.lower

xarray.DataArray.str.lower#

DataArray.str.lower()[source]#

Convert strings in the array to lowercase.

Returns:

lowered (same type as values)

Examples

>>> da = xr.DataArray(["Temperature", "PRESSURE"], dims="x")
>>> da
<xarray.DataArray (x: 2)> Size: 88B
array(['Temperature', 'PRESSURE'], dtype='<U11')
Dimensions without coordinates: x
>>> lowered = da.str.lower()
>>> lowered
<xarray.DataArray (x: 2)> Size: 88B
array(['temperature', 'pressure'], dtype='<U11')
Dimensions without coordinates: x