-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
QST: Replace subset of DataFrame by another subset of DataFrame #36424
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
Hi @zxdawn - please ask usage questions on StackOverflow first Did you not get a Use
for assignment |
Thanks, @MarcoGorelli. It works now. BTW, I didn't get the warning with |
Thanks for the report - I can confirm that 1.0.5 doesn't give this warning with this snippet, while 1.1.2 does. Reopening for now with |
|
take |
Insn't this question about why it does not do the replacing? |
Yes, but I believe I answered that in #36424 (comment) , as you should not use chained indexing for assignment, https://pandas.pydata.org/docs/user_guide/indexing.html However, the OP didn't get a warning, even though they should've, so a test to make sure that such a warning will continue to be thrown would be useful |
Uh oh!
There was an error while loading. Please reload this page.
I have searched the [pandas] tag on StackOverflow for similar questions.
I have asked my usage related question on StackOverflow.
Question about pandas
Note: If you'd still like to submit a question, please read this guide detailing how to provide the necessary information for us to reproduce your question.
original
df
:I want to replace the subset of the copy with the subset of original
df
:However, it shows no change at all:
The text was updated successfully, but these errors were encountered: