pandas.CategoricalDtype.categories#

property CategoricalDtype.categories[源代码]#

一个包含允许的唯一类别的 Index

Examples

>>> cat_type = pd.CategoricalDtype(categories=['a', 'b'], ordered=True)
>>> cat_type.categories
Index(['a', 'b'], dtype='object')