Skip to content

Commit 1a3daf4

Browse files
authored
BUG: RecursionError with CategoricalIndex.get_indexer (#42089)
1 parent 098e3d7 commit 1a3daf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/indexes/base.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3410,7 +3410,9 @@ def get_indexer(
34103410
if is_categorical_dtype(target.dtype):
34113411
# potential fastpath
34123412
# get an indexer for unique categories then propagate to codes via take_nd
3413-
categories_indexer = self.get_indexer(target.categories)
3413+
# Note: calling get_indexer instead of _get_indexer causes
3414+
# RecursionError GH#42088
3415+
categories_indexer = self._get_indexer(target.categories)
34143416
indexer = algos.take_nd(categories_indexer, target.codes, fill_value=-1)
34153417

34163418
if (not self._is_multi and self.hasnans) and target.hasnans:

0 commit comments

Comments
 (0)