pandas.CategoricalIndex¶
-
class
pandas.CategoricalIndex¶ Immutable Index implementing an ordered, sliceable set. CategoricalIndex represents a sparsely populated Index with an underlying Categorical.
New in version 0.16.1.
Parameters: data : array-like or Categorical, (1-dimensional)
categories : optional, array-like
categories for the CategoricalIndex
ordered : boolean,
designating if the categories are ordered
copy : bool
Make a copy of input ndarray
name : object
Name to be stored in the index
Attributes
Treturn the transpose, which is by definition self asi8basereturn the base object if the memory of the underlying data is shared categoriescodesdatareturn the data pointer of the underlying data dtypedtype_strflagshas_duplicateshasnansinferred_typeis_all_datesis_monotonicalias for is_monotonic_increasing (deprecated) is_monotonic_decreasingreturn if the index is monotonic decreasing (only equal or is_monotonic_increasingreturn if the index is monotonic increasing (only equal or is_uniqueitemsizereturn the size of the dtype of the item of the underlying data namenamesnbytesreturn the number of bytes in the underlying data ndimreturn the number of dimensions of the underlying data, by definition 1 nlevelsorderedshapereturn a tuple of the shape of the underlying data sizereturn the number of elements in the underlying data stridesreturn the strides of the underlying data valuesreturn the underlying data, which is a Categorical Methods