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

Method isspace

xarray/core/accessor_str.py:999–1021  ·  view source on GitHub ↗

Check whether all characters in each string are spaces. Returns ------- isspace : array of bool Array of boolean values with the same shape as the original array. Examples -------- >>> da = xr.DataArray(["", " ", "\\t", "\\n"], d

(self)

Source from the content-addressed store, hash-verified

997 return self._apply(func=lambda x: x.isnumeric(), dtype=bool)
998
999 def isspace(self) -> T_DataArray:
1000 """
1001 Check whether all characters in each string are spaces.
1002
1003 Returns
1004 -------
1005 isspace : array of bool
1006 Array of boolean values with the same shape as the original array.
1007
1008 Examples
1009 --------
1010 >>> da = xr.DataArray(["", " ", "\\t", "\\n"], dims="x")
1011 >>> da
1012 <xarray.DataArray (x: 4)> Size: 16B
1013 array(['', ' ', '\\t', '\\n'], dtype='<U1')
1014 Dimensions without coordinates: x
1015 >>> isspace = da.str.isspace()
1016 >>> isspace
1017 <xarray.DataArray (x: 4)> Size: 4B
1018 array([False, True, True, True])
1019 Dimensions without coordinates: x
1020 """
1021 return self._apply(func=lambda x: x.isspace(), dtype=bool)
1022
1023 def istitle(self) -> T_DataArray:
1024 """

Callers 1

test_empty_str_methodsFunction · 0.80

Calls 1

_applyMethod · 0.95

Tested by 1

test_empty_str_methodsFunction · 0.64