class_docstr: Index based on an underlying :class:`Categorical`.
  
  CategoricalIndex, like Categorical, can only take on a limited,
  and usually fixed, number of possible values (`categories`). Also,
  like Categorical, it might have an order, but numerical operations
  (additions, divisions, ...) are not possible.
  
  Parameters
  ----------
  data : array-like (1-dimensional)
      The values of the categorical. If `categories` are given, values not in
      `categories` will be replaced with NaN.
  categories : index-like, optional
      The categories for the categorical. Items need to be unique.
      If the categories are not given here (and also not in `dtype`), they
      will be inferred from the `data`.
  ordered : bool, optional
      Whether or not this categorical is treated as an ordered
      categorical. If not given here or in `dtype`, the resulting
      categorical will be unordered.
  dtype : CategoricalDtype or "category", optional
      If :class:`CategoricalDtype`, cannot be used together with
      `categories` or `ordered`.
  copy : bool, default False
      Make a copy of input ndarray.
  name : object, optional
      Name to be stored in the index.
  
  Attributes
  ----------
  codes
  categories
  ordered
  
  Methods
  -------
  rename_categories
  reorder_categories
  add_categories
  remove_categories
  remove_unused_categories
  set_categories
  as_ordered
  as_unordered
  map
  
  Raises
  ------
  ValueError
      If the categories do not validate.
  TypeError
      If an explicit ``ordered=True`` is given but no `categories` and the
      `values` are not sortable.
  
  See Also
  --------
  Index : The base pandas Index type.
  Categorical : A categorical array.
  CategoricalDtype : Type for categorical data.
  
  Notes
  -----
  See the `user guide
  <https://pandas.pydata.org/pandas-docs/stable/user_guide/advanced.html#categoricalindex>`__
  for more.
  
  Examples
  --------
  >>> pd.CategoricalIndex(["a", "b", "c", "a", "b", "c"])
  CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'],
                   categories=['a', 'b', 'c'], ordered=False, dtype='category')
  
  ``CategoricalIndex`` can also be instantiated from a ``Categorical``:
  
  >>> c = pd.Categorical(["a", "b", "c", "a", "b", "c"])
  >>> pd.CategoricalIndex(c)
  CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'],
                   categories=['a', 'b', 'c'], ordered=False, dtype='category')
  
  Ordered ``CategoricalIndex`` can have a min and max value.
  
  >>> ci = pd.CategoricalIndex(
  ...     ["a", "b", "c", "a", "b", "c"], ordered=True, categories=["c", "b", "a"]
  ... )
  >>> ci
  CategoricalIndex(['a', 'b', 'c', 'a', 'b', 'c'],
                   categories=['c', 'b', 'a'], ordered=True, dtype='category')
  >>> ci.min()
  'c'
class_docstr_tok: ["Index","based","on","an","underlying",":","class",":","`","Categorical","`",".","CategoricalIndex",",","like","Categorical",",","can","only","take","on","a","limited",",","and","usually","fixed",",","number","of","possible","values","(","`","categories","`",")",".","Also",",","like","Categorical",",","it","might","have","an","order",",","but","numerical","operations","(","additions",",","divisions",",","...",")","are","not","possible",".","Parameters","--","--","--","--","--","data",":","array-like","(","1-dimensional",")","The","values","of","the","categorical",".","If","`","categories","`","are","given",",","values","not","in","`","categories","`","will","be","replaced","with","NaN",".","categories",":","index-like",",","optional","The","categories","for","the","categorical",".","Items","need","to","be","unique",".","If","the","categories","are","not","given","here","(","and","also","not","in","`","dtype","`",")",",","they","will","be","inferred","from","the","`","data","`",".","ordered",":","bool",",","optional","Whether","or","not","this","categorical","is","treated","as","an","ordered","categorical",".","If","not","given","here","or","in","`","dtype","`",",","the","resulting","categorical","will","be","unordered",".","dtype",":","CategoricalDtype","or","``","category","''",",","optional","If",":","class",":","`","CategoricalDtype","`",",","can","not","be","used","together","with","`","categories","`","or","`","ordered","`",".","copy",":","bool",",","default","False","Make","a","copy","of","input","ndarray",".","name",":","object",",","optional","Name","to","be","stored","in","the","index",".","Attributes","--","--","--","--","--","codes","categories","ordered","Methods","--","--","--","-","rename_categories","reorder_categories","add_categories","remove_categories","remove_unused_categories","set_categories","as_ordered","as_unordered","map","Raises","--","--","--","ValueError","If","the","categories","do","not","validate",".","TypeError","If","an","explicit","``","ordered=True","``","is","given","but","no","`","categories","`","and","the","`","values","`","are","not","sortable",".","See","Also","--","--","--","--","Index",":","The","base","pandas","Index","type",".","Categorical",":","A","categorical","array",".","CategoricalDtype",":","Type","for","categorical","data",".","Notes","--","--","-","See","the","`","user","guide","<","https",":","\/\/pandas.pydata.org\/pandas-docs\/stable\/user_guide\/advanced.html","#","categoricalindex",">","`","__","for","more",".","Examples","--","--","--","--",">",">",">","pd.CategoricalIndex","(","[","``","a","''",",","``","b","''",",","``","c","''",",","``","a","''",",","``","b","''",",","``","c","''","]",")","CategoricalIndex","(","[","'","a","'",",","'","b","'",",","'","c","'",",","'","a","'",",","'","b","'",",","'","c","'","]",",","categories=","[","'","a","'",",","'","b","'",",","'","c","'","]",",","ordered=False",",","dtype='category","'",")","``","CategoricalIndex","``","can","also","be","instantiated","from","a","``","Categorical","``",":",">",">",">","c","=","pd.Categorical","(","[","``","a","''",",","``","b","''",",","``","c","''",",","``","a","''",",","``","b","''",",","``","c","''","]",")",">",">",">","pd.CategoricalIndex","(","c",")","CategoricalIndex","(","[","'","a","'",",","'","b","'",",","'","c","'",",","'","a","'",",","'","b","'",",","'","c","'","]",",","categories=","[","'","a","'",",","'","b","'",",","'","c","'","]",",","ordered=False",",","dtype='category","'",")","Ordered","``","CategoricalIndex","``","can","have","a","min","and","max","value",".",">",">",">","ci","=","pd.CategoricalIndex","(","...","[","``","a","''",",","``","b","''",",","``","c","''",",","``","a","''",",","``","b","''",",","``","c","''","]",",","ordered=True",",","categories=","[","``","c","''",",","``","b","''",",","``","a","''","]","...",")",">",">",">","ci","CategoricalIndex","(","[","'","a","'",",","'","b","'",",","'","c","'",",","'","a","'",",","'","b","'",",","'","c","'","]",",","categories=","[","'","c","'",",","'","b","'",",","'","a","'","]",",","ordered=True",",","dtype='category","'",")",">",">",">","ci.min","(",")","'","c","'"]
docstr: Determine if two CategoricalIndex objects contain the same elements.
  
  Returns
  -------
  bool
      If two CategoricalIndex objects have equal elements True,
      otherwise False.
docstr_tok: ["Determine","if","two","CategoricalIndex","objects","contain","the","same","elements",".","Returns","--","--","--","-","bool","If","two","CategoricalIndex","objects","have","equal","elements","True",",","otherwise","False","."]
code: def equals(self, other: object) -> bool:
      """
      Determine if two CategoricalIndex objects contain the same elements.
  
      Returns
      -------
      bool
          If two CategoricalIndex objects have equal elements True,
          otherwise False.
      """
      if self.is_(other):
          return True
  
      if not isinstance(other, Index):
          return False
  
      try:
          other = self._is_dtype_compat(other)
      except (TypeError, ValueError):
          return False
  
      return self._data.equals(other)
  
imports: from __future__ import annotations
  from typing import Any, Hashable
  import numpy
  from pandas._libs import index
  from pandas._typing import Dtype, DtypeObj, npt
  from pandas.util._decorators import cache_readonly, doc
  from pandas.core.dtypes.common import is_categorical_dtype, is_scalar
  from pandas.core.dtypes.missing import is_valid_na_for_dtype, isna, notna
  from pandas.core.arrays.categorical import Categorical, contains
  from pandas.core.construction import extract_array
  import pandas.core.indexes.base
  from pandas.core.indexes.base import Index, maybe_extract_name
  from pandas.core.indexes.extension import NDArrayBackedExtensionIndex, inherit_names
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 6 for calling the CategoricalIndex obj's underlying member method code with example usage: obj.equals(other) and returns: self, True, False, False