str.
rfind
Return highest indexes in each strings in the Series where the substring is fully contained between [start:end].
Return -1 on failure. Equivalent to standard str.rfind().
str.rfind()
Substring being searched.
Left edge index.
Right edge index.
Series of highest matching indexes.
Examples
>>> s = ps.Series(['apple', 'oranges', 'bananas'])
>>> s.str.rfind('a') 0 0 1 2 2 5 dtype: int64
>>> s.str.rfind('a', start=2) 0 -1 1 2 2 5 dtype: int64
>>> s.str.rfind('a', end=1) 0 0 1 -1 2 -1 dtype: int64
>>> s.str.rfind('a', start=2, end=2) 0 -1 1 -1 2 -1 dtype: int64