0

I am trying to change a column value in pandas. My current code is:

df.loc[:,"origin"] = df.loc[:,"origin"].map(my_fun)

The commands seems to work, but it returns a SettingWithCopyWarning. I have also tried:

df.loc[:,"origin"] = df.loc[:,"origin"].map(my_fun).copy(deep=True)

but i got the same result. What is the issue?

My pandas is 1.1.2

0 Answers0