-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
BUG: Index.get_indexer_not_unique inconsistent return types vs get_indexer #16819
Comments
this is techincally wrong, it should return a platform ndarray as the indexer, see #16820 , similar to |
actually repurposing this issue to fix the bug. #16820 (comment) e.g. something like this will expose the bug
|
@ri938 love to have a PR! |
So you would like for conversion to index in "return Index(indexer)", from get_indexer_non_unique to be removed so this returns the correct type? (and tests) |
yes I think that would work (see what breaks) |
Created PR #16826 |
See https://pandas.pydata.org/pandas-docs/stable/generated/pandas.Index.get_indexer_non_unique.html where the return value of Index.get_indexer_non_unique indexer is stated to be ndarray whereas actually this is converted into a Index before it is returned
indexer, missing = self._engine.get_indexer_non_unique(tgt_values)
return Index(indexer), missing
The text was updated successfully, but these errors were encountered: