def _rsplit(expr, pat=None, n=-1):
    """
    Split each string in the Series/Index by the given delimiter string,
    starting at the end of the string and working to the front.
    Equivalent to str.rsplit().

    :param expr:
    :param pat: Separator to split on. If None, splits on whitespace
    :param n: None, 0 and -1 will be interpreted as return all splits
    :return: sequence or scalar
    """

    return _string_op(expr, RSplit, output_type=types.List(types.string),
                      _pat=pat, _n=n)