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
T
return the transpose, which is by definition self asi8
base
return the base object if the memory of the underlying data is shared categories
codes
data
return the data pointer of the underlying data dtype
dtype_str
flags
has_duplicates
hasnans
inferred_type
is_all_dates
is_monotonic
alias for is_monotonic_increasing (deprecated) is_monotonic_decreasing
return if the index is monotonic decreasing (only equal or is_monotonic_increasing
return if the index is monotonic increasing (only equal or is_unique
itemsize
return the size of the dtype of the item of the underlying data name
names
nbytes
return the number of bytes in the underlying data ndim
return the number of dimensions of the underlying data, by definition 1 nlevels
ordered
shape
return a tuple of the shape of the underlying data size
return the number of elements in the underlying data strides
return the strides of the underlying data values
return the underlying data, which is a Categorical Methods