pandas.Series.str.rindex
pandas 3.1.1 · Series and accessors · method
Get the last position of a substring, raising for an unsuccessful lookup.
Call syntax
Series.str.rindex(sub, start=0, end=None)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
sub |
Required Positional or keyword |
str Provide the substring used by a string search. |
start |
Optional Positional or keyword Default 0 |
int Supply the start point of a range, slice, or calculation. |
end |
Optional Positional or keyword Default None |
int Supply the endpoint of the range or calculation. |
Returns
Series or Index of object