Skip to content

Fix PeriodIndex.get_indexer with non-PI #30686

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 1 commit into from
Jan 4, 2020

Conversation

jbrockmendel
Copy link
Member

I'm pretty sure that for non-comparable we should be returning an array of -1s, not raising. Can you double-check me on that @jreback?

@jreback jreback added Index Related to the Index class or subclasses Period Period data type labels Jan 4, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this not tested before? yeah looks like a good change

@jreback jreback added this to the 1.0 milestone Jan 4, 2020
@jbrockmendel
Copy link
Member Author

was this not tested before?

Most of the existing tests pass a PeriodIndex. There is one existing test that passes a DatetimeIndex to PeriodIndex.get_indexer_nonunique (which currently incorrectly calls asi8 before doing a freq check).

@jreback jreback merged commit c289b10 into pandas-dev:master Jan 4, 2020
@jreback
Copy link
Contributor

jreback commented Jan 4, 2020

k thanks

@jbrockmendel jbrockmendel deleted the bug-get_indexer branch January 4, 2020 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants