pandas.Categorical.dtype#

property Categorical.dtype[源代码]#

此实例 the CategoricalDtype

Examples

>>> cat = pd.Categorical(['a', 'b'], ordered=True)
>>> cat
['a', 'b']
Categories (2, object): ['a' < 'b']
>>> cat.dtype
CategoricalDtype(categories=['a', 'b'], ordered=True, categories_dtype=object)