-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Get ready for pandas 3 copy-on-write #8843
Comments
I would recommend to either copy the data they come from a pandas object or set the flags to writeable if you are ok with the implications or if you don't modify the data inplace anyway. That said, modifying the underlying data of an Index is a really bad idea if you or your users want to re-use the Index. That can lead to segfaults among other things Be aware if you set the flag to writeable, this is not possible in all scenarios, e.g.
This will raise, arrow protects against this and does not allow you to set the flag to writeable |
Thanks @phofl I suspect this assertion is overly broad and we didn't want to do it for Index-backed Xarray variables. |
* Support pandas copy-on-write behaviour Closes #8843 * Update xarray/tests/__init__.py * One more fix * Fix interp * Avoid copy * Try again
What is your issue?
This line fails with
pd.set_options("mode.copy_on_write", True)
xarray/xarray/tests/__init__.py
Line 329 in c9d3084
We'll need to fix this before Pandas 3 is released in April:
xarray/xarray/tests/__init__.py
Line 329 in c9d3084
Here's a test
The text was updated successfully, but these errors were encountered: