Skip to content

Commit a66482e

Browse files
authored
CLN: remove CategoricalIndex._engine (#38529)
1 parent 7d8a052 commit a66482e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pandas/core/indexes/category.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pandas._libs import index as libindex
99
from pandas._libs.lib import no_default
1010
from pandas._typing import ArrayLike, Label
11-
from pandas.util._decorators import Appender, cache_readonly, doc
11+
from pandas.util._decorators import Appender, doc
1212

1313
from pandas.core.dtypes.common import (
1414
ensure_platform_int,
@@ -381,14 +381,6 @@ def fillna(self, value, downcast=None):
381381
cat = self._data.fillna(value)
382382
return type(self)._simple_new(cat, name=self.name)
383383

384-
@cache_readonly
385-
def _engine(self):
386-
# we are going to look things up with the codes themselves.
387-
# To avoid a reference cycle, bind `codes` to a local variable, so
388-
# `self` is not passed into the lambda.
389-
codes = self.codes
390-
return self._engine_type(lambda: codes, len(self))
391-
392384
@doc(Index.unique)
393385
def unique(self, level=None):
394386
if level is not None:

0 commit comments

Comments
 (0)