pyspark.pandas.CategoricalIndex.categories#
- property CategoricalIndex.categories#
The categories of this categorical.
Examples
>>> idx = ps.CategoricalIndex(list("abbccc")) >>> idx CategoricalIndex(['a', 'b', 'b', 'c', 'c', 'c'], categories=['a', 'b', 'c'], ordered=False, dtype='category')
>>> idx.categories Index(['a', 'b', 'c'], dtype='object')