pandas dataframe change row values by map code example
Example 1: replace column values pandas
df['column'] = df['column'].str.replace(',','-')
df
Example 2: 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 3: pandas rename column values dictionary
df['col1'].map(di).fillna(df['col1'])