Skip to content

Commit 6c88a9d

Browse files
jbrockmendelJulianWgs
authored andcommitted
BUG: IntervalIndex.intersection (pandas-dev#41883)
1 parent 6485e48 commit 6c88a9d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/indexes/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3127,7 +3127,8 @@ def _intersection_via_get_indexer(self, other: Index, sort) -> ArrayLike:
31273127
left_unique = self.drop_duplicates()
31283128
right_unique = other.drop_duplicates()
31293129

3130-
indexer = left_unique.get_indexer(right_unique)
3130+
# even though we are unique, we need get_indexer_for for IntervalIndex
3131+
indexer = left_unique.get_indexer_for(right_unique)
31313132

31323133
mask = indexer != -1
31333134

0 commit comments

Comments
 (0)