REF: IntervalIndex.get_value partial slicing #31117
Labels
good first issue
Indexing
Related to indexing on series/frames, not to indexes themselves
Interval
Interval data type
Needs Tests
Unit test(s) needed to prevent regressions
Milestone
In trying to refactor IntervalIndex.get_loc/get_value to more closely follow the other implementations, I stumbled on a behavior in a test case that surprised me:
All of the other FooIndex.get_value methods raise InvalidIndexError on non-scalar.
AFAICT this is behaving sort of like a slicing operation, since 4 is in the interior of both of these intervals. @jschendel is that correct? If so, we should try to refactor IntervalIndex.get_value to explicitly dispatch for this case, kind of like DatetimeIndex._get_string_slice
The text was updated successfully, but these errors were encountered: