-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: pd.merge fail with numpy.intc on Windows #52451
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
Comments
Also stumbled across this issue when upgrading to pandas 2.0.0. Here is a slightly simpler reproducer that doesn't involve
|
Adding |
Thanks for the report! Pull requests welcome |
Without this, on Windows, the underlying dtype.type is np.intc rather than np.int32 or np.int64, which results in an error when calling pd.merge. Work around pandas 2.0.0 bug on windows: pandas-dev/pandas#52451 Fixes #2382.
take |
I cannot reproduce it on Pandas 2.0.1. |
I forgot the problem only happens on Windows... |
Hi @hoxbro, I noticed that the same issue arises for |
If you have already tested it, I suggest opening a PR with the fix and adding a test 🙂 |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
The example raises a KeyError on Windows and Pandas 2.0.
The example work if I convert
A = pd.DataFrame(tris.simplices.astype(int))
Expected Behavior
No KeyError and that the merge happens.
Installed Versions
The text was updated successfully, but these errors were encountered: