+
    ŜiF                    P   ^ RI Ht ^ RIHtHt ^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ RIt^ R
IHtHt ^ RIHt ^ RIHtHt ^ RIHtHtHtH t  ^ RI!H"t"H#t#H$t$ ]'       d   ^ RIH%t% R] PL                  R] PN                  R] PP                  R] PR                  R] PT                  R] PV                  R] PV                  /t,] PP                  ]PZ                  R3] PV                  ]P\                  ]3] PL                  ]P^                  R3] PN                  ]P^                  R3] PR                  ]P^                  R3] P`                  ]P\                  R3] PT                  ]Pb                  ^ 3/t2]P^                  R]PZ                  R]P\                  R/t3 ! R R]4      t4R# )    )annotations)TYPE_CHECKINGAnyN)using_python_scalars)infer_dtype)iNaT)NoBufferPresent)cache_readonly)BaseMaskedDtype)
ArrowDtypeDatetimeTZDtype)is_string_dtype)PandasBufferPandasBufferPyarrow)ColumnColumnBuffersColumnNullType	DtypeKind)ArrowCTypes
Endiannessdtype_to_arrow_c_fmt)BufferiufbUMmzThis column is non-nullablezThis column uses NaN as nullz!This column uses a sentinel valuec                     ] tR t^JtRtR R R lltR R lt]R R l4       t]	R R	 l4       t
R
 R lt]R 4       t]R 4       t]	R R l4       t]R R l4       tR R ltR!R R lltR R ltR R ltR R ltR R ltRtR# )"PandasColumna  
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.
c               $    V ^8  d   QhRRRRRR/# )   columnz	pd.Series
allow_copyboolreturnNone )formats   "g/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/pandas/core/interchange/column.py__annotate__PandasColumn.__annotate__V   s!     & &y &d &d &    c                    \        V\        P                  4      '       d   \        RVP                   R24      h\        V\        P
                  4      '       g   \        R\        V4       R24      hWn        W n	        R# )z]
Note: doesn't deal with extension arrays yet, just assume a regular
Series/ndarray for now.
zExpected a Series, got a DataFrame. This likely happened because you called __dataframe__ on a DataFrame which, after converting column names to string, resulted in duplicated names: zD. Please rename these columns before using the interchange protocol.zColumns of type  not handled yetN)

isinstancepd	DataFrame	TypeErrorcolumnsSeriesNotImplementedErrortype_col_allow_copy)selfr$   r%   s   &&&r+   __init__PandasColumn.__init__V   sw    
 fbll++ !..) *22  &")),,%(8fFV&WXX 	%r.   c                   V ^8  d   QhRR/# r#   r'   intr)   )r*   s   "r+   r,   r-   j   s      c r.   c                .    V P                   P                  # )z"
Size of the column, in elements.
)r9   sizer;   s   &r+   rB   PandasColumn.sizej   s     yy~~r.   c                   V ^8  d   QhRR/# r?   r)   )r*   s   "r+   r,   r-   q   s       r.   c                    ^ # )z'
Offset of first element. Always zero.
r)   rC   s   &r+   offsetPandasColumn.offsetp   s     r.   c                   V ^8  d   QhRR/# r#   r'   ztuple[DtypeKind, int, str, str]r)   )r*   s   "r+   r,   r-   y   s     7 76 7r.   c                	   V P                   P                  p\        V\        P                  4      '       dc   V P                   P
                  P                  pV P                  VP                  4      w  pppp\        P                  VV\        P                  3# \        V4      '       dQ   \        V P                   4      R9   d,   \        P                  ^\        V4      \        P                  3# \!        R4      hV P                  V4      # )stringz.Non-string object dtypes are not supported yet)rL   empty)r9   dtyper1   r2   CategoricalDtypevaluescodes_dtype_from_pandasdtyper   CATEGORICALr   NATIVEr   r   STRINGr   r7   )r;   rN   rQ   _bitwidthc_arrow_dtype_f_strs   &     r+   rN   PandasColumn.dtypex   s    		eR0011II$$**E ,,U[[9# %%#!!	  U##499%)<<$$(/%%	  &&VWW//66r.   c                   V ^8  d   QhRR/# rJ   r)   )r*   s   "r+   r,   r-      s     P P0O Pr.   c                   \         P                  VP                  R4      pVf   \        RV R24      h\	        V\
        4      '       d   VP                  P                  pMf\	        V\        4      '       d   VP                  P                  pM9\	        V\        4      '       d   VP                  P                  pMVP                  pVR8X  d   VVP                  \        P                  V3# W!P                  ^,          \        V4      V3# )z
See `self.dtype` for details.
N
Data type z& not supported by interchange protocolzbool[pyarrow])	_NP_KINDSgetkind
ValueErrorr1   r   numpy_dtype	byteorderr   baser   itemsizer   BOOLr   )r;   rN   r_   rb   s   &&  r+   rR   $PandasColumn._dtype_from_pandasdtype   s     }}UZZ.<z%0VWXXeZ(())33I//

,,I//))33IIO#   	  ^^a')=e)DiOOr.   c           
     &   V P                   ^ ,          \        P                  8X  g   \        R4      hRV P                  P
                  P                  RRR\        \        P                  ! V P                  P
                  P                  4      4      /# )a  
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.
zCdescribe_categorical only works on a column with categorical dtype!
is_orderedis_dictionaryT
categories)rN   r   rS   r4   r9   catorderedr!   r2   r6   rj   rC   s   &r+   describe_categorical!PandasColumn.describe_categorical   so    $ zz!}	 5 55U 
 $))--//T,ryy1I1I'JK
 	
r.   c                	>   \        V P                  P                  \        4      '       d   \        P
                  p^pW3# \        V P                  P                  \        4      '       dm   V P                  P                  P                  P                  ^ ,          P                  4       ^ ,          f   \        P                  R3# \        P                  ^ 3# V P                  ^ ,          p \        V,          w  rEWE3#   \         d   p\        RT R24      ThRp?ii ; i)   Nr\   z not yet supported)r1   r9   rN   r   r   USE_BYTEMASKr   array	_pa_arraychunksbuffersNON_NULLABLEUSE_BITMASK_NULL_DESCRIPTIONKeyErrorr7   )r;   column_null_dtype
null_valuer_   nullvalueerrs   &      r+   describe_nullPandasColumn.describe_null   s    diioo77 . ; ;J$00diiooz22 yy((//2::<Q?G%22D88!--q00zz!}	V+D1KD {  	V%
4&8J&KLRUU	Vs   *C< <DDDc                   V ^8  d   QhRR/# r?   r)   )r*   s   "r+   r,   r-      s      C r.   c                    V P                   P                  4       P                  4       p\        4       '       g   VP	                  4       pV# )z2
Number of null elements. Should always be known.
)r9   isnasumr   item)r;   results   & r+   
null_countPandasColumn.null_count   s6    
 !%%'#%%[[]Fr.   c                   V ^8  d   QhRR/# )r#   r'   zdict[str, pd.Index]r)   )r*   s   "r+   r,   r-      s     1 1- 1r.   c                2    RV P                   P                  /# )z(
Store specific metadata of the column.
zpandas.index)r9   indexrC   s   &r+   metadataPandasColumn.metadata   s    
 		00r.   c                   V ^8  d   QhRR/# r?   r)   )r*   s   "r+   r,   r-      s      C r.   c                    ^# )z5
Return the number of chunks the column consists of.
r)   rC   s   &r+   
num_chunksPandasColumn.num_chunks   s     r.   Nc                   V ^8  d   QhRR/# )r#   n_chunksz
int | Noner)   )r*   s   "r+   r,   r-      s      : r.   c              #  <  "   V'       d   V^8  d   \        V P                  4      pW!,          pW!,          ^ 8w  d
   V^,          p\        ^ W1,          V4       F8  p\        V P                  P                  WDV,            V P
                  4      x  K:  	  R# V x  R# 5i)za
Return an iterator yielding the chunks.
See `DataFrame.get_chunks` for details on ``n_chunks``.
N)lenr9   ranger!   ilocr:   )r;   r   rB   stepstarts   &&   r+   
get_chunksPandasColumn.get_chunks   s}     
 1tyy>D#D!#	q$/48"IINN54<8$:J:J  9
 Js   BBc                   V ^8  d   QhRR/# )r#   r'   r   r)   )r*   s   "r+   r,   r-     s     # #] #r.   c                    RV P                  4       RRRR/p V P                  4       VR&    V P                  4       VR&   V#   \         d     L#i ; i  \         d     T# i ; i)a  
Return a dictionary containing the underlying buffers.
The returned dictionary has the following contents:
    - "data": a two-element tuple whose first element is a buffer
              containing the data and whose second element is the data
              buffer's associated dtype.
    - "validity": a two-element tuple whose first element is a buffer
                  containing mask values indicating missing data and
                  whose second element is the mask value buffer's
                  associated dtype. None if the null representation is
                  not a bit or byte mask.
    - "offsets": a two-element tuple whose first element is a buffer
                 containing the offset values for variable-size binary
                 data (e.g., variable-length strings) and whose second
                 element is the offsets buffer's associated dtype. None
                 if the data buffer does not have an associated offsets
                 buffer.
datavalidityNoffsets)_get_data_buffer_get_validity_bufferr	   _get_offsets_buffer)r;   ru   s   & r+   get_buffersPandasColumn.get_buffers  s    ( D))+t"
	"&";";"=GJ	!%!9!9!;GI   		
  		s"   A A AAA! A!c                   V ^8  d   QhRR/# )r#   r'   z.tuple[Buffer, tuple[DtypeKind, int, str, str]]r)   )r*   s   "r+   r,   r-   5  s     I I	7Ir.   c                F   V P                   ^ ,          \        P                  8X  d   \        V P                   ^,          4      ^8  d5   V P                  P
                  P                  R4      P                  4       pMV P                  P                  4       p\        WP                  R7      p\        P                  ^@\        P                  \        P                  3pW#3# V P                   ^ ,          \        P                  \        P                  \        P                   \        P"                  39   d   V P                   pV P                  P$                  p\'        V P                  P                   \(        4      '       dL   VP*                  P,                  ^ ,          p\/        VP1                  4       ^,          \        V4      R7      pW#3# \'        V P                  P                   \2        4      '       d   VP4                  pMVP6                  p\        WP                  R7      pW#3# V P                   ^ ,          \        P8                  8X  dU   V P                  P:                  P<                  p\        WPP                  R7      pV P?                  VP                   4      pW#3# V P                   ^ ,          \        P@                  8X  d   V P                  P                  4       p\C        4       pV F<  p\'        V\D        4      '       g   K  VPG                  VPI                  RR7      4       K>  	  \        \J        PL                  ! VRR7      4      p\        P                  ^\        PN                  \        P                  3pW#3# \Q        RV P                  P                    R	24      h)
zJ
Return the buffer containing the data and the buffer's associated dtype.
N)r%   lengthutf-8encodinguint8)rN   r\   r0   ))rN   r   DATETIMEr   r9   dt
tz_convertto_numpyr   r:   INTr   INT64r   rT   UINTFLOATre   rr   r1   r   rs   rt   r   ru   r   _data_ndarrayrS   rP   _codesrR   rU   	bytearraystrextendencodenp
frombufferUINT8r7   )	r;   np_arrbufferrN   arrrQ   bufr   objs	   &        r+   r   PandasColumn._get_data_buffer5  s    ::a=I... 4::a=!A%006??A++-!&5E5EFF!!!!	Et }i ZZ]MMNNOONN	
 
 JJE))//C$))//:66 mm**1-,KKM!$s8 }$$))//?;;!&5E5EFF> }= ZZ]i333II$$++E!%4D4DEF00=E6 }5 ZZ]i...))$$&CA c3''HHSZZZ9:  ""--"ABF !!!!	E } &
499??2CCS&TUUr.   c                   V ^8  d   QhRR/# )r#   r'   ztuple[Buffer, Any] | Noner)   )r*   s   "r+   r,   r-     s     7# 7#&? 7#r.   c                    V P                   w  r\        V P                  P                  \        4      '       d   V P                  P
                  P                  P                  ^ ,          p\        P                  ^\        P                  \        P                  3pVP                  4       ^ ,          f   R# \        VP                  4       ^ ,          \        V4      R7      pWT3# \        V P                  P                  \         4      '       d_   V P                  P
                  P"                  p\%        V4      p\        P                  ^\        P                  \        P                  3pWT3# V P                  ^ ,          \        P&                  8X  d   V P                  P)                  4       pV^ 8H  pV'       * p\*        P,                  ! \        V4      3\*        P.                  R7      p\1        V4       F!  w  r\        V
\2        4      '       d   TMTWi&   K#  	  \%        V4      p\        P                  ^\        P                  \        P                  3pWT3#  \4        V,           R2p\;        T4      h  \6         d   p\9        R4      ThRp?ii ; i)z
Return the buffer containing the mask values indicating missing data and
the buffer's associated dtype.
Raises NoBufferPresent if null representation is not a bit or byte mask.
Nr   shaperN   z! so does not have a separate maskzSee self.describe_null)r   r1   r9   rN   r   rr   rs   rt   r   re   r   r   rT   ru   r   r   r   _maskr   rU   r   r   zerosbool_	enumerater   _NO_VALIDITY_BUFFERry   r7   r	   )r;   r|   invalidr   rN   r   maskr   validr   r   msgr~   s   &            r+   r   !PandasColumn._get_validity_buffer  s    **diiooz22 ))//++2215C^^Q(8(8*:K:KLE{{}Q'(a 3xF = diioo7799??((D!$'F^^Q(8(8*:K:KLE= ::a=I,,, ))$$&C qLEiG883s8+RXX>D#C.#-c3#7#7%W )
 "$'F ^^Q(8(8*:K:KLE= 	I(.//PQC
 c""	  	I%&>?SH	Is   I1 1J<JJc                   V ^8  d   QhRR/# )r#   r'   ztuple[PandasBuffer, Any]r)   )r*   s   "r+   r,   r-     s     & &%= &r.   c                8   V P                   ^ ,          \        P                  8X  d   V P                  P	                  4       p^ p\
        P                  ! \        V4      ^,           3\
        P                  R7      p\        V4       FJ  w  rE\        V\        4      '       d%   VP                  RR7      pV\        V4      ,          pW#V^,           &   KL  	  \        V4      p\        P                  ^@\        P                   \"        P$                  3pWx3# \'        R4      h)z
Return the buffer containing the offset values for variable-size binary
data (e.g., variable-length strings) and the buffer's associated dtype.
Raises NoBufferPresent if the data buffer does not have an associated
offsets buffer.
r   r   r   zJThis column has a fixed-length dtype so it does not have an offsets buffer)rN   r   rU   r9   r   r   r   r   int64r   r1   r   r   r   r   r   r   r   rT   r	   )	r;   rP   ptrr   r   vr   r   rN   s	   &        r+   r    PandasColumn._get_offsets_buffer  s     ::a=I,,,YY'')FChhc&kAo%7rxxHG!&) a%%'2A3q6MC!$A * "'*F !!!!	E } "5 r.   )r:   r9   )T)N)__name__
__module____qualname____firstlineno____doc__r<   rB   propertyrG   r
   rN   rR   rm   r   r   r   r   r   r   r   r   r   __static_attributes__r)   r.   r+   r!   r!   J   s    	&(   7 7:PB 
 
8  &   1 1"#JIV7#r& &r.   r!   )5
__future__r   typingr   r   numpyr   pandas._configr   pandas._libs.libr   pandas._libs.tslibsr   pandas.errorsr	   pandas.util._decoratorsr
   pandas.core.dtypes.dtypesr   pandasr2   r   r   pandas.api.typesr   pandas.core.interchange.bufferr   r   *pandas.core.interchange.dataframe_protocolr   r   r   r   pandas.core.interchange.utilsr   r   r   r   r   r   r   re   rU   r   r]   USE_NANUSE_SENTINELrv   rS   rq   rx   r   r!   r)   r.   r+   <module>r      sz   "
  / ( $ ) 2 5  -   A 							 OOn,,d344d;MMN//6NN^00$7NN^00$7 N77<~22A6  !>:!D U6 Ur.   