Skip to content

Empty KeyError when trying to merge Int32 and int32[pyarrow] columns #52406

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

Closed
canutog opened this issue Apr 4, 2023 · 4 comments · Fixed by #52422
Closed

Empty KeyError when trying to merge Int32 and int32[pyarrow] columns #52406

canutog opened this issue Apr 4, 2023 · 4 comments · Fixed by #52422
Labels
Arrow pyarrow functionality Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Milestone

Comments

@canutog
Copy link

canutog commented Apr 4, 2023

Hi, I'm using Pandas 2.0.0. When I tried to merge two int columns('int32', 'int32[pyarrow]') I recieved an empty KeyError.

When I try to merge columns of different dtypes like int and object the KeyError has an explicit message saying that you're trying to merge with two columns of different types.

But this does not happen for int32 and int32[pyarrow] or float for similar types between old format and pyarrow new format.

Could you please update, so that this error can be identified more easily? I spent aproximately 4h figuring this out.
Thanks

merging_int_and_int pyarrow
code_to_reproduce_error.txt

@phofl phofl added this to the 2.0.1 milestone Apr 4, 2023
@phofl
Copy link
Member

phofl commented Apr 4, 2023

Hi, thanks for your report. Please provide a minimal and reproducible example, see https://matthewrocklin.com/minimal-bug-reports

Your example is too large. Also please fill out our issue template in the future.

@mroeschke mroeschke added the Needs Info Clarification about behavior needed to assess issue label Apr 4, 2023
@canutog
Copy link
Author

canutog commented Apr 4, 2023 via email

@phofl
Copy link
Member

phofl commented Apr 4, 2023

This is not a minimal example, this is way too much code

@canutog
Copy link
Author

canutog commented Apr 4, 2023

In pandas 1.5.3, this example works fine. With Pandas 2.0.0, the example returns a key error without any information
error_example.txt

@phofl phofl added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Arrow pyarrow functionality and removed Needs Info Clarification about behavior needed to assess issue labels Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants