@@ -125,7 +125,7 @@ def _create_from_codes(self, codes, categories=None, ordered=None,
125
125
CategoricalIndex
126
126
"""
127
127
128
- from pandas .core .categorical import Categorical
128
+ from pandas .core .arrays import Categorical
129
129
if categories is None :
130
130
categories = self .categories
131
131
if ordered is None :
@@ -162,7 +162,7 @@ def _create_categorical(self, data, categories=None, ordered=None,
162
162
if not isinstance (data , ABCCategorical ):
163
163
if ordered is None and dtype is None :
164
164
ordered = False
165
- from pandas .core .categorical import Categorical
165
+ from pandas .core .arrays import Categorical
166
166
data = Categorical (data , categories = categories , ordered = ordered ,
167
167
dtype = dtype )
168
168
else :
@@ -462,7 +462,7 @@ def where(self, cond, other=None):
462
462
other = self ._na_value
463
463
values = np .where (cond , self .values , other )
464
464
465
- from pandas .core .categorical import Categorical
465
+ from pandas .core .arrays import Categorical
466
466
cat = Categorical (values ,
467
467
categories = self .categories ,
468
468
ordered = self .ordered )
@@ -775,7 +775,7 @@ def _delegate_method(self, name, *args, **kwargs):
775
775
def _add_accessors (cls ):
776
776
""" add in Categorical accessor methods """
777
777
778
- from pandas .core .categorical import Categorical
778
+ from pandas .core .arrays import Categorical
779
779
CategoricalIndex ._add_delegate_accessors (
780
780
delegate = Categorical , accessors = ["rename_categories" ,
781
781
"reorder_categories" ,
0 commit comments