-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
indexed assignment does not work for dataframe #5938
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
You are doing a chained assignment to a copy, see here: http://pandas.pydata.org/pandas-docs/dev/indexing.html#indexing-view-versus-copy Use
|
this does not work for the same reason.
this operation works on Series objects just fine, but if the column(s) selection is done like ['c'] it does not work. I've read the docs but this still doesn't work in the non-trivial case of assigning to a subset of n columns. What have I missed? |
you are using 0.13? This works on master; I think this was just fixed on 0.13 you can do as a work-around:
|
You can also do these. The rhs is aligned to what is selected on the lhs. As long as its a frame/series it should work (if its an ndarray/list its tricker as their are no labels to exiplicity to align)
|
I'm using the latest version I can get from Anaconda distribution, which is 0.12. I'll see if I can get 0.13. This solution works for this example but I'll have to see if it generalizes to the more complex use case. Thanks for the help. |
The text was updated successfully, but these errors were encountered: