-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
API: define __copy__ NDFrame #8571
Comments
The fact that copy doesn't work as expected without providing a Also, I don't really get why
|
pickling isn't broken and always deep because that's the default (copy=True) |
It's not about copying the class-level attribute, it's about preserving object-level attribute as mandated by a modified class-level attribute. If there's some public-API-level contract about that somewhere (I admit I haven't seen any yet) that attributes mentioned in As for |
@immerrr modifying it doesn't matter what |
Ok, no contract — no worries.
Isn't there a |
- closes pandas-dev#10556, add policy argument to constructors - closes pandas-dev#9216, all passing of dict with view directly to the API - closes pandas-dev#5902 - closes pandas-dev#8571 by defining __copy__/__deepcopy__
@jreback Was this closed by jreback@d82196c (from above)? Thanks |
no that's something else |
"closes #8571 by defining copy/deepcopy"? |
it was not merged |
I see. So would adding |
I think you can just define them as I did at the top |
prints
on
|
- closes pandas-dev#10556, add policy argument to constructors - closes pandas-dev#9216, all passing of dict with view directly to the API - closes pandas-dev#5902 - closes pandas-dev#8571 by defining __copy__/__deepcopy__
yes |
from SO
this allows
copy.copy(df)
to work properlyby definition 'always' deep
The text was updated successfully, but these errors were encountered: