From 8f6e27e286efd3e0cba97357d543e7b674d22cb1 Mon Sep 17 00:00:00 2001 From: Brock Date: Wed, 16 Dec 2020 14:13:52 -0800 Subject: [PATCH] CLN: remove CategoricalIndex._engine --- pandas/core/indexes/category.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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: