Skip to content

BUG: merge raising for ea int and numpy float #54755

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 4 commits into from
Aug 26, 2023
Merged

Conversation

phofl
Copy link
Member

@phofl phofl commented Aug 25, 2023

Ideally I'd like to get this in, but not a blocker

@phofl phofl requested a review from mroeschke August 25, 2023 14:39
@mroeschke
Copy link
Member

mypy.....................................................................Failed
- hook id: mypy
- duration: 105.59s
- exit code: 1

pandas/core/reshape/merge.py:1393: error: Item "dtype[Any]" of "dtype[Any] | ExtensionDtype" has no attribute "construct_array_type"  [union-attr]
pandas/core/reshape/merge.py:1396: error: Item "dtype[Any]" of "dtype[Any] | ExtensionDtype" has no attribute "construct_array_type"  [union-attr]
Found 2 errors in 1 file (checked 1413 source files)

if is_extension_array_dtype(lk.dtype) and not is_extension_array_dtype(
rk.dtype
):
ct = find_common_type([lk.dtype, rk.dtype])
Copy link
Member

Choose a reason for hiding this comment

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

Do we know that this will always return an ExtensionDtype? Might be good to first check that it is one

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah one more check won't hurt. Updated

@phofl phofl added this to the 2.1 milestone Aug 26, 2023
@phofl phofl added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label Aug 26, 2023
@mroeschke mroeschke merged commit 9939c32 into pandas-dev:main Aug 26, 2023
@lumberbot-app
Copy link

lumberbot-app bot commented Aug 26, 2023

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.1.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 9939c323e636d580e8ca1690aef40b6822ff02f7
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #54755: BUG: merge raising for ea int and numpy float'
  1. Push to a named branch:
git push YOURFORK 2.1.x:auto-backport-of-pr-54755-on-2.1.x
  1. Create a PR against branch 2.1.x, I would have named this PR:

"Backport PR #54755 on branch 2.1.x (BUG: merge raising for ea int and numpy float)"

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.

@mroeschke
Copy link
Member

Thanks @phofl

phofl added a commit to phofl/pandas that referenced this pull request Aug 27, 2023
* BUG: merge raising for ea int and numpy float

* Fix up mypy and add check

(cherry picked from commit 9939c32)
phofl added a commit that referenced this pull request Aug 27, 2023
… numpy float) (#54779)

BUG: merge raising for ea int and numpy float (#54755)

* BUG: merge raising for ea int and numpy float

* Fix up mypy and add check

(cherry picked from commit 9939c32)
mroeschke pushed a commit to mroeschke/pandas that referenced this pull request Sep 11, 2023
* BUG: merge raising for ea int and numpy float

* Fix up mypy and add check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Merge error when merge col is int64 and Int64
2 participants