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

API: prohibit non-numeric dtypes in construction of IntervalIndex #19016

Closed
jreback opened this Issue Dec 31, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@jreback
Contributor

jreback commented Dec 31, 2017

xref #18997

prohibit construction of non-numeric sub-types for IntervalIndex, e.g. object and categorical. Not clear utility and causes a messy implementation.

@jreback

This comment has been minimized.

Contributor

jreback commented Dec 31, 2017

@jreback jreback changed the title from API: prohibit dtypes in construction of IntervalIndex to API: prohibit non-numeric dtypes in construction of IntervalIndex Dec 31, 2017

@jschendel

This comment has been minimized.

Member

jschendel commented Dec 31, 2017

To be clear, do we want to disallow non-numeric dtypes just for IntervalIndex, or for Interval as well?

@jreback

This comment has been minimized.

Contributor

jreback commented Dec 31, 2017

yes

@shoyer

This comment has been minimized.

Member

shoyer commented Dec 31, 2017

In theory, it makes sense to have string intervals, e.g., the first and last name on each page of a phonebook. But our current IntervalIndex indexing (with the interval tree) does not support efficient lookups for non-numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment