Skip to content

API: copy(deep=False) -> view? #33823

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

Closed
jbrockmendel opened this issue Apr 27, 2020 · 2 comments
Closed

API: copy(deep=False) -> view? #33823

jbrockmendel opened this issue Apr 27, 2020 · 2 comments

Comments

@jbrockmendel
Copy link
Member

These should behave the same, shouldn't they? If so, we should use the more standard usage (view).

Ditto for _shallow_copy() with no args.

@jbrockmendel jbrockmendel added API Design Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 27, 2020
@jorisvandenbossche jorisvandenbossche removed the Needs Triage Issue that has not been reviewed by a pandas team member label Apr 28, 2020
@jorisvandenbossche
Copy link
Member

About what object are you talking?
I suppose Series or Index, since ExtensionArrays don't have a deep keyword (this was removed #27083).

For Series, based on a quick look, a difference right now is that copy(deep=False) reuses the same array object, while view always takes a view of the array.
(not saying this is necessarily a good difference, to be clear, just looking at what potential differences in implementation right now are)

@jbrockmendel
Copy link
Member Author

I suppose Series or Index

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants