Skip to content
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

PERF: RangeIndex.__getitem__ with integers return RangeIndex #57770

Merged
merged 13 commits into from
Mar 12, 2024

Conversation

mroeschke
Copy link
Member

Builds on #57752

Discovered in #57441

@mroeschke mroeschke added Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance Index Related to the Index class or subclasses labels Mar 7, 2024
@mroeschke mroeschke added this to the 3.0 milestone Mar 7, 2024
@WillAyd
Copy link
Member

WillAyd commented Mar 11, 2024

This looks to have a lot of overlap with #57752 - is that expected?

@mroeschke
Copy link
Member Author

This looks to have a lot of overlap with #57752 - is that expected?

Yes, this relies on some of the changes in #57752

@mroeschke mroeschke merged commit 04487b3 into pandas-dev:main Mar 12, 2024
47 checks passed
@mroeschke mroeschke deleted the ref/getitem_take branch March 12, 2024 23:51
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
…dev#57770)

* PERF: RangeIndex.take with 1 value return RangeIndex

* add issue number

* Move to _shallow_copy, support empty join as well

* Fix self.name

* FIx error message

* Fix hdf test

* PERF: RangeIndex.__getitem__ with integers return RangeIndex

* PERF: RangeIndex.__getitem__ with integers return RangeIndex

* Handle ellipse

* Catch ValueError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Indexing Related to indexing on series/frames, not to indexes themselves Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants