Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Pandas 1.0.1
In [2]: N = 1000
In [3]: c = pd.CategoricalIndex(list("a" * N + "b" * N + "c" * N))
In [4]: s = pd.Series(c)
In [5]: %timeit s.is_monotonic_increasing
35.3 µs ± 663 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)
Master
In [5]: %timeit s.is_monotonic_increasing
73.6 µs ± 782 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)