class_docstr: A column object, with only the methods and properties required by the
  interchange protocol defined.
  A column can contain one or more chunks. Each chunk can contain up to three
  buffers - a data buffer, a mask buffer (depending on null representation),
  and an offsets buffer (if variable-size binary; e.g., variable-length
  strings).
  Note: this Column object can only be produced by ``__dataframe__``, so
        doesn't need its own version or ``__column__`` protocol.
class_docstr_tok: ["A","column","object",",","with","only","the","methods","and","properties","required","by","the","interchange","protocol","defined",".","A","column","can","contain","one","or","more","chunks",".","Each","chunk","can","contain","up","to","three","buffers","-","a","data","buffer",",","a","mask","buffer","(","depending","on","null","representation",")",",","and","an","offsets","buffer","(","if","variable-size","binary",";","e.g.",",","variable-length","strings",")",".","Note",":","this","Column","object","can","only","be","produced","by","``","__dataframe__","``",",","so","does","n't","need","its","own","version","or","``","__column__","``","protocol","."]
docstr: If the dtype is categorical, there are two options:
  - There are only values in the data buffer.
  - There is a separate non-categorical Column encoding for categorical values.
  
  Raises TypeError if the dtype is not categorical
  
  Content of returned dict:
      - "is_ordered" : bool, whether the ordering of dictionary indices is
                       semantically meaningful.
      - "is_dictionary" : bool, whether a dictionary-style mapping of
                          categorical values to other objects exists
      - "categories" : Column representing the (implicit) mapping of indices to
                       category values (e.g. an array of cat1, cat2, ...).
                       None if not a dictionary-style categorical.
docstr_tok: ["If","the","dtype","is","categorical",",","there","are","two","options",":","-","There","are","only","values","in","the","data","buffer",".","-","There","is","a","separate","non-categorical","Column","encoding","for","categorical","values",".","Raises","TypeError","if","the","dtype","is","not","categorical","Content","of","returned","dict",":","-","``","is_ordered","''",":","bool",",","whether","the","ordering","of","dictionary","indices","is","semantically","meaningful",".","-","``","is_dictionary","''",":","bool",",","whether","a","dictionary-style","mapping","of","categorical","values","to","other","objects","exists","-","``","categories","''",":","Column","representing","the","(","implicit",")","mapping","of","indices","to","category","values","(","e.g",".","an","array","of","cat1",",","cat2",",","...",")",".","None","if","not","a","dictionary-style","categorical","."]
code: def describe_categorical(self):
      """
      If the dtype is categorical, there are two options:
      - There are only values in the data buffer.
      - There is a separate non-categorical Column encoding for categorical values.
  
      Raises TypeError if the dtype is not categorical
  
      Content of returned dict:
          - "is_ordered" : bool, whether the ordering of dictionary indices is
                           semantically meaningful.
          - "is_dictionary" : bool, whether a dictionary-style mapping of
                              categorical values to other objects exists
          - "categories" : Column representing the (implicit) mapping of indices to
                           category values (e.g. an array of cat1, cat2, ...).
                           None if not a dictionary-style categorical.
      """
      if not self.dtype[0] == DtypeKind.CATEGORICAL:
          raise TypeError(
              "describe_categorical only works on a column with categorical dtype!"
          )
  
      return {
          "is_ordered": self._col.cat.ordered,
          "is_dictionary": True,
          "categories": PandasColumn(
              pd.Series(self._col.cat.categories)
          ),
      }
  
imports: from __future__ import annotations
  from typing import Any
  import numpy
  from pandas._libs.lib import infer_dtype
  from pandas._libs.tslibs import iNaT
  from pandas.errors import NoBufferPresent
  from pandas.util._decorators import cache_readonly
  import pandas
  from pandas.api.types import is_categorical_dtype, is_string_dtype
  from pandas.core.interchange.buffer import PandasBuffer
  from pandas.core.interchange.dataframe_protocol import Column, ColumnBuffers, ColumnNullType, DtypeKind
  from pandas.core.interchange.utils import ArrowCTypes, Endianness, dtype_to_arrow_c_fmt
label_desc: Use image node_id 6 for calling the PandasColumn obj's underlying member method code with example usage: obj.describe_categorical() and returns: dict