how to replace all elements in a column pands
df = pd.DataFrame({"column1": ["a", "b", "a"]})
print(df)
OUTPUT
column1
0 a
1 b
2 a
df["column1"].replace({"a": "x", "b": "y"}, inplace=True)
print(df)
OUTPUT
column1
0 x
1 y
2 x