Closed
Description
When #7217 becomes available, it would be nice to also have a 'CategoricalIndex' so that the sorting behaviour based on levels will be preserved when a categorical becomes a index:
cats = pd.Categorical([1,2,3,4], levels=[4,2,3,1])
strings = ["a","b","c","d"]
values = [4,2,3,1]
df = pd.DataFrame({"strings":strings, "values":values}, index=cats)
df.index
# This should sort by levels but does not as there is no CategoricalIndex!
df.sort_index()
CC: @shoyer