pandas.Series.add_suffix
pandas 3.1.1 · Series and accessors · method
Append text to labels on the chosen axis.
Call syntax
Series.add_suffix(suffix, axis=None)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. |
axis |
Optional Positional or keyword Default None |
{0 or 'index', 1 or 'columns', None} Choose which axis the operation acts on. The accepted axis labels depend on the receiver. |
Returns
Series or DataFrame