File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1213,6 +1213,7 @@ Performance Improvements
1213
1213
The speed increase is both when indexing by label (using .loc) and position(.iloc) (:issue: `20395 `)
1214
1214
Slicing a monotonically increasing :class: `CategoricalIndex ` itself (i.e. ``ci[1000:2000] ``)
1215
1215
shows similar speed improvements as above (:issue: `21659 `)
1216
+ - Improved performance of :meth: `CategoricalIndex.equals ` when comparing to another :class: `CategoricalIndex ` (:issue: `24023 `)
1216
1217
- Improved performance of :func: `Series.describe ` in case of numeric dtpyes (:issue: `21274 `)
1217
1218
- Improved performance of :func: `pandas.core.groupby.GroupBy.rank ` when dealing with tied rankings (:issue: `21237 `)
1218
1219
- Improved performance of :func: `DataFrame.set_index ` with columns consisting of :class: `Period ` objects (:issue: `21582 `, :issue: `21606 `)
Original file line number Diff line number Diff line change 13
13
is_scalar )
14
14
from pandas .core .dtypes .dtypes import CategoricalDtype
15
15
from pandas .core .dtypes .generic import ABCCategorical , ABCSeries
16
- from pandas .core .dtypes .missing import array_equivalent , isna
16
+ from pandas .core .dtypes .missing import isna
17
17
18
18
from pandas .core import accessor
19
19
from pandas .core .algorithms import take_1d
@@ -283,7 +283,9 @@ def equals(self, other):
283
283
284
284
try :
285
285
other = self ._is_dtype_compat (other )
286
- return array_equivalent (self ._data , other )
286
+ if isinstance (other , type (self )):
287
+ other = other ._data
288
+ return self ._data .equals (other )
287
289
except (TypeError , ValueError ):
288
290
pass
289
291
You can’t perform that action at this time.
0 commit comments