Closed
Description
>>> import pandas as pd
>>> pd.CategoricalIndex(['a', 'b'], categories=['a', 'b']).equals(
... pd.CategoricalIndex(['a', 'b'], categories=['b', 'a']))
False
I fixed this for regular Categoricals in #16339, but that didn't affect CategoricalIndex.equals. Do we want .equals
to ignore order when ordered=False
on both (I think we do)?
Discovered during my CategoricalDtype refactor, which does fix it so that order is ignored when order=False
.