You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [8]: importpandas.util.testingastmIn [9]: s=pd.Series(tm.makeCategoricalIndex(k=100))
In [10]: s.value_counts()
Out[10]:
vcKH40vXR931Zn8J29dtype: int64In [11]: s.value_counts().indexOut[11]: Index(['vcKH', 'vXR9', 'Zn8J'], dtype='object')
Now that we have CategoricalIndex (thanks Jeff), should that type be preserved so that Out[11] is a CategoricalIndex? My use-case (not shown in this example) is when the original categories are ordered, you get your value_counts and then want to sort the index.