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).
  
  TBD: Arrow has a separate "null" dtype, and has no separate mask concept.
       Instead, it seems to use "children" for both columns with a bit mask,
       and for nested dtypes. Unclear whether this is elegant or confusing.
       This design requires checking the null representation explicitly.
  
       The Arrow design requires checking:
       1. the ARROW_FLAG_NULLABLE (for sentinel values)
       2. if a column has two children, combined with one of those children
          having a null dtype.
  
       Making the mask concept explicit seems useful. One null dtype would
       not be enough to cover both bit and byte masks, so that would mean
       even more checking if we did it the Arrow way.
  
  TBD: there's also the "chunk" concept here, which is implicit in Arrow as
       multiple buffers per array (= column here). Semantically it may make
       sense to have both: chunks were meant for example for lazy evaluation
       of data which doesn't fit in memory, while multiple buffers per column
       could also come from doing a selection operation on a single
       contiguous buffer.
  
       Given these concepts, one would expect chunks to be all of the same
       size (say a 10,000 row dataframe could have 10 chunks of 1,000 rows),
       while multiple buffers could have data-dependent lengths. Not an issue
       in pandas if one column is backed by a single NumPy array, but in
       Arrow it seems possible.
       Are multiple chunks *and* multiple buffers per column necessary for
       the purposes of this interchange protocol, or must producers either
       reuse the chunk concept for this or copy the data?
  
  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",")",".","TBD",":","Arrow","has","a","separate","``","null","''","dtype",",","and","has","no","separate","mask","concept",".","Instead",",","it","seems","to","use","``","children","''","for","both","columns","with","a","bit","mask",",","and","for","nested","dtypes",".","Unclear","whether","this","is","elegant","or","confusing",".","This","design","requires","checking","the","null","representation","explicitly",".","The","Arrow","design","requires","checking",":","1.","the","ARROW_FLAG_NULLABLE","(","for","sentinel","values",")","2.","if","a","column","has","two","children",",","combined","with","one","of","those","children","having","a","null","dtype",".","Making","the","mask","concept","explicit","seems","useful",".","One","null","dtype","would","not","be","enough","to","cover","both","bit","and","byte","masks",",","so","that","would","mean","even","more","checking","if","we","did","it","the","Arrow","way",".","TBD",":","there","'s","also","the","``","chunk","''","concept","here",",","which","is","implicit","in","Arrow","as","multiple","buffers","per","array","(","=","column","here",")",".","Semantically","it","may","make","sense","to","have","both",":","chunks","were","meant","for","example","for","lazy","evaluation","of","data","which","does","n't","fit","in","memory",",","while","multiple","buffers","per","column","could","also","come","from","doing","a","selection","operation","on","a","single","contiguous","buffer",".","Given","these","concepts",",","one","would","expect","chunks","to","be","all","of","the","same","size","(","say","a","10,000","row","dataframe","could","have","10","chunks","of","1,000","rows",")",",","while","multiple","buffers","could","have","data-dependent","lengths",".","Not","an","issue","in","pandas","if","one","column","is","backed","by","a","single","NumPy","array",",","but","in","Arrow","it","seems","possible",".","Are","multiple","chunks","*","and","*","multiple","buffers","per","column","necessary","for","the","purposes","of","this","interchange","protocol",",","or","must","producers","either","reuse","the","chunk","concept","for","this","or","copy","the","data","?","Note",":","this","Column","object","can","only","be","produced","by","``","__dataframe__","``",",","so","does","n't","need","its","own","version","or","``","__column__","``","protocol","."]
docstr: Dtype description as a tuple ``(kind, bit-width, format string,
  endianness)``.
  
  Bit-width : the number of bits as an integer
  Format string : data type description format string in Apache Arrow C
                  Data Interface format.
  Endianness : current only native endianness (``=``) is supported
  
  Notes:
      - Kind specifiers are aligned with DLPack where possible (hence the
        jump to 20, leave enough room for future extension)
      - Masks must be specified as boolean with either bit width 1 (for
        bit masks) or 8 (for byte masks).
      - Dtype width in bits was preferred over bytes
      - Endianness isn't too useful, but included now in case in the
        future we need to support non-native endianness
      - Went with Apache Arrow format strings over NumPy format strings
        because they're more complete from a dataframe perspective
      - Format strings are mostly useful for datetime specification, and
        for categoricals.
      - For categoricals, the format string describes the type of the
        categorical in the data buffer. In case of a separate encoding of
        the categorical (e.g. an integer to string mapping), this can
        be derived from ``self.describe_categorical``.
      - Data types not included: complex, Arrow-style null, binary,
        decimal, and nested (list, struct, map, union) dtypes.
docstr_tok: ["Dtype","description","as","a","tuple","``","(","kind",",","bit-width",",","format","string",",","endianness",")","``",".","Bit-width",":","the","number","of","bits","as","an","integer","Format","string",":","data","type","description","format","string","in","Apache","Arrow","C","Data","Interface","format",".","Endianness",":","current","only","native","endianness","(","``","=","``",")","is","supported","Notes",":","-","Kind","specifiers","are","aligned","with","DLPack","where","possible","(","hence","the","jump","to","20",",","leave","enough","room","for","future","extension",")","-","Masks","must","be","specified","as","boolean","with","either","bit","width","1","(","for","bit","masks",")","or","8","(","for","byte","masks",")",".","-","Dtype","width","in","bits","was","preferred","over","bytes","-","Endianness","is","n't","too","useful",",","but","included","now","in","case","in","the","future","we","need","to","support","non-native","endianness","-","Went","with","Apache","Arrow","format","strings","over","NumPy","format","strings","because","they","'re","more","complete","from","a","dataframe","perspective","-","Format","strings","are","mostly","useful","for","datetime","specification",",","and","for","categoricals",".","-","For","categoricals",",","the","format","string","describes","the","type","of","the","categorical","in","the","data","buffer",".","In","case","of","a","separate","encoding","of","the","categorical","(","e.g",".","an","integer","to","string","mapping",")",",","this","can","be","derived","from","``","self.describe_categorical","``",".","-","Data","types","not","included",":","complex",",","Arrow-style","null",",","binary",",","decimal",",","and","nested","(","list",",","struct",",","map",",","union",")","dtypes","."]
code: def dtype(self) -> Tuple[DtypeKind, int, str, str]:
      """
      Dtype description as a tuple ``(kind, bit-width, format string,
      endianness)``.
  
      Bit-width : the number of bits as an integer
      Format string : data type description format string in Apache Arrow C
                      Data Interface format.
      Endianness : current only native endianness (``=``) is supported
  
      Notes:
          - Kind specifiers are aligned with DLPack where possible (hence the
            jump to 20, leave enough room for future extension)
          - Masks must be specified as boolean with either bit width 1 (for
            bit masks) or 8 (for byte masks).
          - Dtype width in bits was preferred over bytes
          - Endianness isn't too useful, but included now in case in the
            future we need to support non-native endianness
          - Went with Apache Arrow format strings over NumPy format strings
            because they're more complete from a dataframe perspective
          - Format strings are mostly useful for datetime specification, and
            for categoricals.
          - For categoricals, the format string describes the type of the
            categorical in the data buffer. In case of a separate encoding of
            the categorical (e.g. an integer to string mapping), this can
            be derived from ``self.describe_categorical``.
          - Data types not included: complex, Arrow-style null, binary,
            decimal, and nested (list, struct, map, union) dtypes.
      """
      return self._dtype
  
imports: from __future__ import annotations
  import enum
  from typing import Any, Dict, Iterable, Optional, Tuple
  import sys
  import pyarrow
  import pyarrow.compute
  from pyarrow.interchange.buffer import _PyArrowBuffer
label_desc: Use image node_id 4 for calling the _PyArrowColumn obj's underlying member method code with example usage: obj.dtype() and returns: self