xarray.core.accessor_str.StringAccessor.rpartition¶
-
StringAccessor.
rpartition
(dim, sep=' ')[source]¶ Split the strings in the DataArray at the last occurrence of separator sep.
This method splits the string at the last occurrence of sep, and returns 3 elements containing the part before the separator, the separator itself, and the part after the separator. If the separator is not found, return 3 elements containing two empty strings, followed by the string itself.
If sep is array-like, it is broadcast against the array and applied elementwise.
- Parameters
- Returns
rpartitioned (
same type as values
orobject array
)
See also
DataArray.str.partition
,str.rpartition
,pandas.Series.str.rpartition