I have a data frame with different columns.One column x has value "a" and other column y has value "b", can I replace both values simultaneously using replace?
I can do it by two statments like
df["x"]=df["x"].replace("a","not a")
df["y"]=df["y"].replace("b","not b")
It works fine but can I do it in one statement like -
df["x","y"]=df["x","y"].replace(["a","b"],["not a","not b"]) ?