-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG-24212 fix when other_index has incompatible dtype #25009
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
Changes from 16 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
b04cee7
BUG-24212 fix usage of Index.take in pd.merge
JustinZhengBC a64b8fe
BUG-24212 add comment
JustinZhengBC 022643d
BUG-24212 clarify test
JustinZhengBC e99dece
BUG-24212 make _create_join_index function
JustinZhengBC b95e1fe
BUG-24212 add docstring and comments
JustinZhengBC 73be0d0
BUG-24212 fix regression
JustinZhengBC de3e2c7
BUG-24212 alter old test
JustinZhengBC 1287758
fix typo
JustinZhengBC bdce7ac
BUG-24212 remove print and move whatsnew note
JustinZhengBC 83ae393
BUG-24212 fix when other_index has incompatible dtype
JustinZhengBC 4cb3ab0
Merge branch 'master' into BUG-24212
JustinZhengBC 66f6fe4
merge issue
JustinZhengBC cf6fa14
fix whatsnew
JustinZhengBC 0e6de81
BUG-24212 fix test
JustinZhengBC 1da789a
BUG-24212 fix test
JustinZhengBC a0e5ffc
Merge branch 'BUG-24212' of https://github.com/justinzhengbc/pandas i…
JustinZhengBC 27cdbc8
BUG-24212 simplify take logic
JustinZhengBC cd326b2
fix import order
JustinZhengBC 2c65ebf
Merge branch 'master' into BUG-24212
JustinZhengBC d8d3cdf
make logic more generic
JustinZhengBC f9e7386
make logic more generic
JustinZhengBC 8a36130
Merge branch 'BUG-24212' of https://github.com/justinzhengbc/pandas i…
JustinZhengBC 7da3655
clean up test
JustinZhengBC 17c5497
use compat=False for na_value_for_dtype
JustinZhengBC 720dfbb
Merge branch 'master' into BUG-24212
JustinZhengBC 6772618
clarify whatsnew
JustinZhengBC dacb4bc
Merge branch 'master' into BUG-24212
JustinZhengBC cad4398
add PR number to whatsnew
JustinZhengBC 5e2eb0f
Merge branch 'BUG-24212' of https://github.com/justinzhengbc/pandas i…
JustinZhengBC 88cdf8b
Merge branch 'master' into BUG-24212
JustinZhengBC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we really don't want to do a try/except here. What is falling into the except?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When 'other_index' has a different dtype that causes an exception to be raised when values from it are inserted into the current index. I did not compare dtypes because in some cases differing dtypes are possible (example:
int
can be added to aFloat64Index
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you:
is_dtype_equal
to test?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think
is_dtype_equal
would work because some combinations of different dtypes are still usable.I agree with the first option because joining on the index of the other frame kind of makes the row order of the other frame arbitrary anyway.