pandas.Series.str.translate
pandas 3.1.1 · Series and accessors · method
Use a translation mapping to replace or remove individual characters.
Call syntax
Series.str.translate(table)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
table |
Required Positional or keyword |
dict |
Returns
Series or Index