Skip to content

BUG: df.getitem returning copy instead of view for unique column in dup index #45526

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

Merged
merged 16 commits into from
Jun 22, 2022

Conversation

phofl
Copy link
Member

@phofl phofl commented Jan 21, 2022

I think this is more intuitive (and "more" correct) than the previous behavior.

@phofl phofl added Copy / view semantics Indexing Related to indexing on series/frames, not to indexes themselves labels Jan 21, 2022
@jbrockmendel
Copy link
Member

perf impact?

@phofl
Copy link
Member Author

phofl commented Jan 23, 2022

perf impact?

Good point. Let's check for uniqueness or that the key is unique, so we only have the drop duplicates call if we have non unique columns

@jreback jreback added this to the 1.5 milestone Jan 28, 2022
@jreback
Copy link
Contributor

jreback commented Mar 6, 2022

@phofl can you merge master and some comments

@phofl
Copy link
Member Author

phofl commented Mar 9, 2022

Done

@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2022

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Apr 9, 2022
@phofl phofl removed the Stale label Apr 22, 2022
@phofl
Copy link
Member Author

phofl commented Apr 22, 2022

Merged master again

@mroeschke
Copy link
Member

@phofl could you merge in one more time. Looks pretty good.

phofl added 2 commits June 14, 2022 10:52
� Conflicts:
�	pandas/tests/indexing/test_chaining_and_caching.py
@phofl
Copy link
Member Author

phofl commented Jun 14, 2022

Done

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Looks to need @jreback 's approval to merge

@jreback jreback merged commit dcf041b into pandas-dev:main Jun 22, 2022
@jreback
Copy link
Contributor

jreback commented Jun 22, 2022

thanks @phofl very nice as always

@phofl phofl deleted the 45316 branch June 22, 2022 07:41
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Copy / view semantics Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
4 participants