maxframe.liteframe.LiteFrame.str.rsplit#

LiteFrame.str.rsplit(pat=None, *, n=-1, expand: bool = False)#

Split strings around given separator/delimiter.

Splits the string in the Series/Index from the end, at the specified delimiter string.

Parameters:
  • pat (str, optional) – String to split on. If not specified, split on whitespace.

  • n (int, default -1 (all)) – Limit number of splits in output. None, 0 and -1 will be interpreted as return all splits.

  • expand (bool, default False) –

    Expand the split strings into separate columns.

    • If True, return DataFrame/MultiIndex expanding dimensionality.

    • If False, return Series/Index, containing lists of strings.

Returns:

Type matches caller unless expand=True (see Notes).

Return type:

Series, Index, DataFrame or MultiIndex

See also

LiteFrame.str.split

Split strings around given separator/delimiter.

LiteFrame.str.rsplit

Splits string around given separator/delimiter, starting from the right.

LiteFrame.str.join

Join lists contained as elements in the Series/Index with passed delimiter.

str.split

Standard library version for split.

str.rsplit

Standard library version for rsplit.

Notes

The handling of the n keyword depends on the number of found splits:

  • If found splits > n, make first n splits only

  • If found splits <= n, make all splits

  • If for a certain row the number of found splits < n, append None for padding up to n if expand=True

If using expand=True, Series and Index callers return DataFrame and MultiIndex objects, respectively.