pandas.Series.str.removesuffix
pandas 3.1.1 · Series and accessors · method
Remove the specified suffix once where it is present.
Call syntax
Series.str.removesuffix(suffix)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
suffix |
Required Positional or keyword |
str Set the text added to labels or the pattern used for wide-column suffixes. |
Returns
Series/Index: object