-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: DataFrame.at allows adding new rows to a DataFrame #48323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
take |
@rhshadrach |
On the other hand, the user guide contradicts this .. (https://pandas.pydata.org/docs/user_guide/indexing.html#fast-scalar-value-getting-and-setting):
In addition, it also seems we basically have been allowing this for a long time (or forever?) Personally, I would prefer limiting |
Thanks @jorisvandenbossche - from your comments I think this should be deprecated rather than considered a bugfix. @srotondo - I do think the same should apply to |
@rhshadrach After reading over the code some more, I see that it is very well established that I'm currently working on a PR that will enforce this behavior in |
Yes, we certainly have intentionally allowed (personally, I think it would be nice to separate the concepts of setting existing values and enlarging / adding labels, but adding yet another indexer that would allow that is also not very compelling) |
There is no activity here for the last 2 months, let's close this issue for now and re-open if needed. |
The docstring of
DataFrame.at
says this should raise a KeyError. This method shouldn't allow the addition of rows because it is ill-performant and makes.at
both an indexing and reshaping method.This may be related to #48224, but seems to me to be a separate issue (at least, from a user perspective).
The text was updated successfully, but these errors were encountered: