You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since there are no guarantees about when a view or copy is returned from the step which sets the value, inconsistent behavior like this is expected. In this case, likely the dtype change forces a copy, so the original df is not modified.
However, I would expect
df.iloc[1].loc["B"] = "888"
to give a SettingWithCopy warning, which I am not seeing in master.
I think with the removal of SettingWithCopyWarning and the enforcment of pdep 6 assignment of a value that doesn't fit the existing dtype here should raise so closing
If I use a loc chained to a iloc I can change a value if it is of the same dtype:
This changes the value to 999.
However, this does not work and fails silently if the dtype is different:
The value is not changed and there is no error raised.
This seems not consistent with the behavior of doing this:
the last code above changes the type of the column silently.
Envirnt:
I am only a beginner in pandas so I am wondering if this should be reported as a bug or requesting a feature request or if this behavior is normal.
The text was updated successfully, but these errors were encountered: