diff --git a/pandas/core/indexes/category.py b/pandas/core/indexes/category.py index e2a7752cf3f0d..7c826000d035a 100644 --- a/pandas/core/indexes/category.py +++ b/pandas/core/indexes/category.py @@ -8,7 +8,7 @@ from pandas._libs import index as libindex from pandas._libs.lib import no_default from pandas._typing import ArrayLike, Label -from pandas.util._decorators import Appender, cache_readonly, doc +from pandas.util._decorators import Appender, doc from pandas.core.dtypes.common import ( ensure_platform_int, @@ -381,14 +381,6 @@ def fillna(self, value, downcast=None): cat = self._data.fillna(value) return type(self)._simple_new(cat, name=self.name) - @cache_readonly - def _engine(self): - # we are going to look things up with the codes themselves. - # To avoid a reference cycle, bind `codes` to a local variable, so - # `self` is not passed into the lambda. - codes = self.codes - return self._engine_type(lambda: codes, len(self)) - @doc(Index.unique) def unique(self, level=None): if level is not None: