0

I'm having a strange behavior on Pandas. Can anyone explain why at and iloc are returning different values?

The code:

df = deepcopy(another dataframe)
print(df.iloc[i]["X"], end="\t")
df.at[i,"X"] = 0.0
print(df.at[i,"X"], end="\t")
print(df.iloc[i]["X"])

Gives me:

11292.1213952329
0.0
11292.1213952329

Why the two last prints are given different results?

mozway
  • 194,879
  • 13
  • 39
  • 75
Roberto
  • 86
  • 1
  • 7

0 Answers0