Skip to content

ENH include the first incompatible key in error message when merging #51947

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 3 commits into from
Mar 14, 2023

Conversation

Charlie-XIAO
Copy link
Contributor

@Charlie-XIAO Charlie-XIAO commented Mar 13, 2023

This PR intends to improve error message of DataFrame.merge when having incompatible keys, as mentioned in Issue #51861. In the current PR, the error message includes only the first incompatible key found for simplicity. Let me know if I should in addition show all incompatible keys or a certain number of them.

@Charlie-XIAO Charlie-XIAO changed the title ENH: When merginig with incompatible keys, include the first incompatible key in the error message ENH: When merging with incompatible keys, include the first incompatible key in the error message Mar 14, 2023
@mroeschke mroeschke added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Error Reporting Incorrect or improved errors from pandas labels Mar 14, 2023
@mroeschke mroeschke added this to the 2.1 milestone Mar 14, 2023
@mroeschke mroeschke merged commit 693fb71 into pandas-dev:main Mar 14, 2023
@mroeschke
Copy link
Member

Thanks @Charlie-XIAO

@Charlie-XIAO Charlie-XIAO changed the title ENH: When merging with incompatible keys, include the first incompatible key in the error message ENH include the first incompatible key in error message when merging May 16, 2023
@Charlie-XIAO Charlie-XIAO deleted the merge-err-msg branch September 23, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: More helpful error messages for merges with incompatible keys
2 participants