Series.str.translate()

pandas.Series.str.translate

Series.str.translate(table, deletechars=None)

Map all characters in the string through the given mapping table. Equivalent to standard str.translate(). Note that the optional argument deletechars is only valid if you are using python 2. For python 3, character deletion should be specified via the table argument.

Parameters:

table : dict (python 3), str or None (python 2)

In python 3, table is a mapping of Unicode ordinal