Skip to content

Commit 81df7df

Browse files
committed
PERF: categorical rank GH#15498
check for numeric instead of monotonic
1 parent 45dd125 commit 81df7df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ def _values_for_rank(self):
14231423
if mask.any():
14241424
values = values.astype('float64')
14251425
values[mask] = np.nan
1426-
elif self.categories.is_monotonic:
1426+
elif self.categories.is_numeric():
14271427
values = np.array(self)
14281428
else:
14291429
values = np.array(

0 commit comments

Comments
 (0)