plydata.cat_tools.cat_rev¶
-
plydata.cat_tools.
cat_rev
(c)[source]¶ Reverse order of categories
- Parameters
- clist-like
Values that will make up the categorical.
- Returns
- out
categorical
Values
- out
Examples
>>> c = ['a', 'b', 'c'] >>> cat_rev(c) ['a', 'b', 'c'] Categories (3, object): ['c', 'b', 'a'] >>> cat_rev(pd.Categorical(c)) ['a', 'b', 'c'] Categories (3, object): ['c', 'b', 'a']