xarray.core.accessor_str.StringAccessor.istitle#
- StringAccessor.istitle()[source]#
Check whether all characters in each string are titlecase.
- Returns
istitle (array of
bool
) – Array of boolean values with the same shape as the original array.
Examples
>>> da = xr.DataArray( ... [ ... "The Evolution Of Species", ... "The Theory of relativity", ... "the quantum mechanics of atoms", ... ], ... dims="title", ... ) >>> da <xarray.DataArray (title: 3)> Size: 360B array(['The Evolution Of Species', 'The Theory of relativity', 'the quantum mechanics of atoms'], dtype='<U30') Dimensions without coordinates: title >>> istitle = da.str.istitle() >>> istitle <xarray.DataArray (title: 3)> Size: 3B array([ True, False, False]) Dimensions without coordinates: title