Find & Replace Equivalent with Pandas
Python
In this example we replace each value 1 with 'A' and 2 with 'B' in the id column.
1| df.loc[df['id'] == 1, 'id'] = 'A' 2| df.loc[df['id'] == 2, 'id'] = 'B'
142
127
122
115