If you want to change values of a pandas Series using a dictionary, use pd.Series.map. Find an example of this method above.
Link to the source code.