-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Invalid cache invalidation leading to assertion errors later #35739
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 mutating a reference show df before you are masking it |
What seems confusing to me is that the already adjusted DataFrame in the cell 53 does not look affected by the change, as if it contains the same data as the DataFrame in the cell 45. |
@veselyvojtech have you been able to investigate this at all? |
I'm pretty sure this is closed by #36051 |
@jbrockmendel if you'd validate and add a test if you think we need. |
Yes, #36051 solves that. Thanks. |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Problem description
By manipulating one column that was created by copying a part of the DataFrame, the cache for this one column is updated in the DataFrame. However, the cached data are not compatible with the DataFrame index and causes problems later, e.g. the AssertionError from the example.
Expected Output
Manipulating separate object would not influence the original object in a way that leads to AssertionError.
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: