sparkbyexamples.com
Pandas Remap Values in Column with a Dictionary (Dict)
We are often required to remap a Pandas DataFrame column values with a dictionary (Dict), you can achieve this by using the DataFrame.replace() method.
Naveen Nelamali