rename pandas values in column code example
Example 1: pandas rename column values dictionary
df['col1'].map(di) # note: if the dictionary does not exhaustively map all
# entries then non-matched entries are changed to NaNs
Example 2: replace values of pandas column
df.loc[df['column'] == 'column_value', 'column'] = 'new_column_value'