Skip to content

BUG[string]: incorrect index downcast in DataFrame.join #61771

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 5 commits into from
Jul 7, 2025

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@@ -865,7 +865,9 @@ Reshaping
- Bug in :meth:`DataFrame.unstack` producing incorrect results when manipulating empty :class:`DataFrame` with an :class:`ExtentionDtype` (:issue:`59123`)
- Bug in :meth:`concat` where concatenating DataFrame and Series with ``ignore_index = True`` drops the series name (:issue:`60723`, :issue:`56257`)
- Bug in :func:`melt` where calling with duplicate column names in ``id_vars`` raised a misleading ``AttributeError`` (:issue:`61475`)
- Bug in :meth:`DataFrame.join` incorrectly downcasting object-dtype indexes (:issue:`61771`)
Copy link
Member

Choose a reason for hiding this comment

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

I guess we would want to backport this fix to 2.3.1?

@simonjayhawkins simonjayhawkins mentioned this pull request Jul 7, 2025
5 tasks
@jorisvandenbossche jorisvandenbossche added the Strings String extension data type and string data label Jul 7, 2025
@jorisvandenbossche jorisvandenbossche added this to the 2.3.1 milestone Jul 7, 2025
@jorisvandenbossche jorisvandenbossche merged commit cf1a11c into pandas-dev:main Jul 7, 2025
43 of 44 checks passed
Copy link

lumberbot-app bot commented Jul 7, 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 cf1a11c1b49d040f7827f30a1a16154c80c552a7
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #61771: BUG[string]: incorrect index downcast in DataFrame.join'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-61771-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #61771 on branch 2.3.x (BUG[string]: incorrect index downcast in DataFrame.join)"

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.

@jorisvandenbossche
Copy link
Member

Thanks @jbrockmendel!

jorisvandenbossche added a commit to jorisvandenbossche/pandas that referenced this pull request Jul 7, 2025
…1771)

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

Manual backport -> #61800

@jbrockmendel jbrockmendel deleted the bug-join branch July 7, 2025 14:47
jorisvandenbossche added a commit that referenced this pull request Jul 7, 2025
…oin (#61771) (#61800)

* BUG[string]: incorrect index downcast in DataFrame.join (#61771)

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

* avoid warning

---------

Co-authored-by: jbrockmendel <jbrockmendel@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants