Skip to content

BUG: merge with arrow and numpy dtypes raises #52422

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 10 commits into from
Apr 6, 2023
Merged

Conversation

phofl
Copy link
Member

@phofl phofl commented Apr 4, 2023

This is similar to what we did for the Indexing engine

@phofl phofl added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Regression Functionality that used to work in a prior pandas version labels Apr 4, 2023
@phofl phofl added this to the 2.0.1 milestone Apr 4, 2023
if not isinstance(lk, BaseMaskedArray):
if not isinstance(lk, BaseMaskedArray) and not (
isinstance(lk.dtype, ArrowDtype)
and is_numeric_dtype(lk.dtype.numpy_dtype.type)
Copy link
Member

@mroeschke mroeschke Apr 5, 2023

Choose a reason for hiding this comment

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

Suggested change
and is_numeric_dtype(lk.dtype.numpy_dtype.type)
and lk.dtype._is_numeric

Might be simpler?

Copy link
Member Author

Choose a reason for hiding this comment

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

doesn't work unfortunately, we have to exclude all arrow dtypes whose numpy dtype is object

@phofl phofl merged commit fdc13d6 into pandas-dev:main Apr 6, 2023
meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Apr 6, 2023
phofl added a commit that referenced this pull request Apr 6, 2023
…types raises) (#52480)

Backport PR #52422: BUG: merge with arrow and numpy dtypes raises

Co-authored-by: Patrick Hoefler <[email protected]>
topper-123 pushed a commit to topper-123/pandas that referenced this pull request Apr 6, 2023
@phofl phofl deleted the merge_fix branch August 28, 2023 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Functionality that used to work in a prior pandas version Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
2 participants