Skip to content

Conversation

@tehunter
Copy link
Contributor

@tehunter tehunter changed the title Bugfix slice selection BUG: DataFrame slice selection treated as hashable in Python 3.12 #57500 Mar 28, 2024
@tehunter
Copy link
Contributor Author

My commits are out of order, but I confirmed the unit test behaves correctly by backing out the bug fix and running my unit test on 3.12. As expected, it failed.

@mroeschke mroeschke added Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex labels Apr 1, 2024
@tehunter tehunter requested a review from mroeschke April 15, 2024 13:19
@mroeschke mroeschke added this to the 3.0 milestone Apr 16, 2024
@mroeschke mroeschke merged commit 53bd1a8 into pandas-dev:main Apr 16, 2024
@mroeschke
Copy link
Member

Thanks @tehunter

pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
…das-dev#57500 (pandas-dev#58043)

* Reorder slice and hashable in __getitem__

* Add unit test

* Fix test and formatting

* Update whatsnew

* Restore original flow ordering

* Move whatsnew entry to 3.0.0

* Move whatsnew entry to Indexing

* Update doc/source/whatsnew/v3.0.0.rst

---------

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
@rhshadrach
Copy link
Member

@mroeschke - you okay with backporting this?

Ref: #61675 (comment)

@mroeschke
Copy link
Member

you okay with backporting this?

Sure, fine by me

@rhshadrach
Copy link
Member

@meeseeksdev backport to 2.3.x

@rhshadrach rhshadrach modified the milestones: 3.0, 2.3.4 Oct 23, 2025
@lumberbot-app
Copy link

lumberbot-app bot commented Oct 23, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.3.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 53bd1a83a987cad854f53db48a4d472dfeffdced
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #58043: BUG: DataFrame slice selection treated as hashable in Python 3.12 #57500'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-58043-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #58043 on branch 2.3.x (BUG: DataFrame slice selection treated as hashable in Python 3.12 #57500)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

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

Labels

Indexing Related to indexing on series/frames, not to indexes themselves MultiIndex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Columns resulting from joining multiIndex dataFrame are incorrect in python 3.12.1

3 participants