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

Backport PR #51895 on branch 2.0.x (BUG: Fix getitem dtype preservation with multiindexes) #53121

Merged
merged 2 commits into from
May 8, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented May 6, 2023

xref #53119

cc @jorisvandenbossche @jbrockmendel

This fixes a pretty bad performance bottleneck for CoW. Would like to backport.

m-richards and others added 2 commits May 6, 2023 23:26
* BUG/TST fix dtype preservation with multindex

* lint

* Update pandas/tests/indexing/multiindex/test_multiindex.py

Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>

* cleanups

* switch to iloc, reindex fails in some cases

* suggestions from code review

* address code review comments

Co-Authored-By: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>

---------

Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>

(cherry picked from commit 194b6bb)
@phofl phofl added this to the 2.0.2 milestone May 6, 2023
@jbrockmendel
Copy link
Member

seems reasonable

@mroeschke mroeschke merged commit 5962f0e into pandas-dev:2.0.x May 8, 2023
@phofl phofl deleted the backport_cow branch May 8, 2023 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants