+
    JV-j€J  ã                  óp  a € 0 t $ ^ RIHt ^ RIHtHt ^ RIHtHtH	t	 ^ RI
t^ RIt^ RIHt ^ RIHt ]t]t]t]P(                  ^]P*                  ! 4       ^]P,                  ! 4       ^ ]P.                  ! 4       ^@]P0                  ! 4       /]P2                  ^]P4                  ! 4       ^]P6                  ! 4       ^ ]P8                  ! 4       ^@]P:                  ! 4       /]P<                  ^]P>                  ! 4       ^ ]P@                  ! 4       ^@]PB                  ! 4       /]PD                  ^]PF                  ! 4       ^]P4                  ! 4       /]PH                  ^]PJ                  ! 4       //t&R]'R&   RR R	 llt(RR
 R llt)RR R llt*RR R llt+RR R llt,RR R llt-R t.R t/RR R llt0RR R llt1RR R llt2R# )é    )Úannotations)ÚAnyÚTuple)Ú	DtypeKindÚColumnBuffersÚColumnNullTypeN)ÚDtypezdict[DtypeKind, dict[int, Any]]Ú_PYARROW_DTYPESc               ó    € V ^8„  d   QhRRRR/# )é   ÚdfÚDataFrameObjectÚreturnzpa.Table© )Úformats   "Ús/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/pyarrow/interchange/from_dataframe.pyÚ__annotate__r   ?   s   € ÷ 2ñ 2�ð 2¸Hñ 2ó    c                ó:  € \        V \        P                  4      '       d   V # \        V \        P                  4      '       d!   \        P                  P	                  V .4      # \        V R4      '       g   \        R4      h\        V P                  VR7      VR7      # )a}  
Build a ``pa.Table`` from any DataFrame supporting the interchange protocol.

Parameters
----------
df : DataFrameObject
    Object supporting the interchange protocol, i.e. `__dataframe__`
    method.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Table
Ú__dataframe__z#`df` does not support __dataframe__)Ú
allow_copy)	Ú
isinstanceÚpaÚTableÚRecordBatchÚfrom_batchesÚhasattrÚ
ValueErrorÚ_from_dataframer   )r   r   s   &&r   Úfrom_dataframer    ?   s{   € ô" �"”b—h‘h×ÒØˆ	Ü	�BœŸ™×	'Ò	'Ü�x‰x×$Ñ$ b TÓ*Ð*ä�2�×'Ò'ÜÐ>Ó?Ð?ä˜2×+Ñ+°zÐ+ÓBØ&0ô2ð 2r   c               ó   € V ^8„  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   \   s   € ÷ *ñ *˜ñ *r   c                óò   € . pV P                  4        F  p\        W14      pVP                  V4       K!  	  V'       g   \        V 4      pVP                  V4       \        P                  P                  V4      # )al  
Build a ``pa.Table`` from the DataFrame interchange object.

Parameters
----------
df : DataFrameObject
    Object supporting the interchange protocol, i.e. `__dataframe__`
    method.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Table
)Ú
get_chunksÚprotocol_df_chunk_to_pyarrowÚappendr   r   r   )r   r   ÚbatchesÚchunkÚbatchs   &&   r   r   r   \   s_   € ð" €GØ—‘–ˆÜ,¨UÓ?ˆØ�‰�uÖñ !÷ Ü,¨RÓ0ˆØ�‰�uÔä�8‰8× Ñ  Ó)Ð)r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   r   Úboolr   zpa.RecordBatchr   )r   s   "r   r   r   y   s&   € ÷ ,/ñ ,/Øð,/àð,/ð ñ,/r   c                óž  € / pV P                  4        EF  p\        V\        4      '       g   \        RV R24      hW29   d   \        RV R24      hV P	                  V4      pVP
                  ^ ,          pV\        P                  \        P                  \        P                  \        P                  \        P                  39   d   \        WA4      W#&   KÃ  V\        P                  8X  d   \        WA4      W#&   Kç  V\        P                  8X  d   \!        WA4      W#&   EK  \#        RV R24      h	  \$        P&                  P)                  V4      # )ap  
Convert interchange protocol chunk to ``pa.RecordBatch``.

Parameters
----------
df : DataFrameObject
    Object supporting the interchange protocol, i.e. `__dataframe__`
    method.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.RecordBatch
zColumn z is not a stringz is not uniquez
Data type z not handled yet)Úcolumn_namesr   Ústrr   Úget_column_by_nameÚdtyper   ÚINTÚUINTÚFLOATÚSTRINGÚDATETIMEÚcolumn_to_arrayÚBOOLÚbool_column_to_arrayÚCATEGORICALÚ categorical_column_to_dictionaryÚNotImplementedErrorr   r   Úfrom_pydict)r   r   ÚcolumnsÚnameÚcolr/   s   &&    r   r$   r$   y   s  € ð* $&€GØ—‘×!ˆÜ˜$¤×$Ò$Ü˜w t fÐ,<Ð=Ó>Ð>ØŒ?Ü˜w t f¨NÐ;Ó<Ð<Ø×#Ñ# DÓ)ˆØ—	‘	˜!•ˆØÜ�M‰MÜ�N‰NÜ�O‰OÜ×ÑÜ×Ñð
ô 
ô ,¨CÓ<ˆG‹MØ”i—n‘nÔ$Ü0°ÓAˆG‹MØ”i×+Ñ+Ô+Ü<¸SÓMˆGŒMä%¨
°5°'Ð9IÐ&JÓKÐKñ) "ô, �>‰>×%Ñ% gÓ.Ð.r   c               ó$   € V ^8„  d   QhRRRRRR/# ©r   r>   ÚColumnObjectr   r*   r   úpa.Arrayr   )r   s   "r   r   r   ¨   s&   € ÷ ñ Ø	ðàðð ñr   c                ó    € V P                  4       pV P                  p\        W#V P                  4       V P                  V P
                  V4      pV# )ab  
Convert a column holding one of the primitive dtypes to a PyArrow array.
A primitive type is one of: int, uint, float, bool (1 bit).

Parameters
----------
col : ColumnObject
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Array
)Úget_buffersr/   Úbuffers_to_arrayÚsizeÚdescribe_nullÚoffset)r>   r   ÚbuffersÚ	data_typeÚdatas   &&   r   r5   r5   ¨   sH   € ð& �o‰oÓ€GØ—	‘	€IÜ˜GØŸH™H›JØ×-Ñ-ØŸJ™JØ&ó	(€Dð
 €Kr   c               ó$   € V ^8„  d   QhRRRRRR/# r@   r   )r   s   "r   r   r   Å   s&   € ÷ $ñ $Ø	ð$àð$ð ñ$r   c                ób  € V P                  4       pVR,          ^,          ^,          pV^8X  d   V'       g   \        R4      hV P                  p\        W$V P	                  4       V P
                  V P                  4      pV^8X  d+   \        P                  ! V\        P                  ! 4       4      pV# )a  
Convert a column holding boolean dtype to a PyArrow array.

Parameters
----------
col : ColumnObject
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Array
rK   zfBoolean column will be casted from uint8 and a copy is required which is forbidden by allow_copy=False)rD   ÚRuntimeErrorr/   rE   rF   rG   rH   ÚpcÚcastr   Úbool_)r>   r   rI   rF   rJ   rK   s   &&    r   r7   r7   Å   s•   € ð$ �o‰oÓ€GØ�6�?˜1Õ˜aÕ €Dð ˆq„yŸÜðAó
ð 	
ð
 —	‘	€IÜ˜GØŸH™H›JØ×-Ñ-ØŸJ™Jó(€Dð ˆq„yÜ�wŠw�tœRŸXšX›ZÓ(ˆà€Kr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r>   rA   r   r*   r   zpa.DictionaryArrayr   )r   s   "r   r   r   ì   s&   € ÷ -ñ -Ø	ð-àð-ð ñ-r   c                ót  € V'       g   \        R4      hV P                  pVR,          '       g   \        R4      hVR,          p\        V4      pV P	                  4       pVR,          w  rg\        WWV P                  4       V P                  V P                  4      p\        P                  P                  W„4      p	V	# )a*  
Convert a column holding categorical data to a pa.DictionaryArray.

Parameters
----------
col : ColumnObject
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.DictionaryArray
zjCategorical column will be casted from uint8 and a copy is required which is forbidden by allow_copy=FalseÚis_dictionaryz-Non-dictionary categoricals not supported yetÚ
categoriesrK   )rN   Údescribe_categoricalr:   r5   rD   rE   rF   rG   rH   r   ÚDictionaryArrayÚfrom_arrays)
r>   r   ÚcategoricalÚ
cat_columnÚ
dictionaryrI   Ú_rJ   ÚindicesÚ
dict_arrays
   &&        r   r9   r9   ì   s´   € ÷$ ÜðAó
ð 	
ð
 ×*Ñ*€Kà�×'Ô'Ü!Ø;ó=ð 	=ð ˜\Õ*€JÜ  Ó,€Jð �o‰oÓ€GØ˜6•?�L€AÜ˜wØ"Ÿx™x›zØ"×0Ñ0Ø"Ÿz™zó+€Gô ×#Ñ#×/Ñ/°ÓD€JàÐr   c                óÄ   € \         P                  ! RV 4      pV'       d5   VP                  ^4      VP                  ^4      r2VR8w  d
   VR,          pW#3# \        RV  24      h)z4Parse datetime `format_str` to interpret the `data`.zts([smun]):(.*)Úsz DateTime kind is not supported: )ÚreÚmatchÚgroupr:   )Ú
format_strÚtimestamp_metaÚunitÚtzs   &   r   Úparse_datetime_format_strrh     sa   € ô —X’XÐ0°*Ó=€NßØ!×'Ñ'¨Ó*¨N×,@Ñ,@ÀÓ,CˆbØ�3Œ;ð �C�KˆDàˆxˆä
Ð @ÀÀÐMÓ
NÐNr   c                óü   € V w  rr4V\         P                  8X  d%   \        V4      w  rV\        P                  ! WVR7      # \
        P                  V/ 4      P                  VR4      pV'       d   V# \        RV  R24      h)z+Map column date type to pyarrow date type. )rg   NzConversion for ú is not yet supported.)r   r4   rh   r   Ú	timestampr
   Úgetr:   )rJ   ÚkindÚ	bit_widthÚf_stringr\   rf   rg   Úpa_dtypes   &       r   Úmap_date_typerq   .  sz   € à#,Ñ €D�XàŒy×!Ñ!Ô!Ü,¨XÓ6‰ˆÜ�|Š|˜DÔ(Ð(ä"×&Ñ& t¨RÓ0×4Ñ4°YÀÓEˆ÷ ØˆOä%Ø! ) Ð,BÐCóEð Er   c               ó4   € V ^8„  d   QhRRRRRRRRR	RR
RRR/# )r   rI   r   rJ   zTuple[DtypeKind, int, str, str]ÚlengthÚintrG   r   rH   r   r*   r   rB   r   )r   s   "r   r   r   @  sW   € ÷ fñ fØðfà.ðfð ðfð "ð	fð
 ðfð ðfð ñfr   c                ó  € V R,          w  rg V R,          w  r‰ V R,          w  r«\        P                  ! VP                  VP                  VR7      pV'       d   \        VX	VVVV4      pM\        VVVVVV4      p\        V4      pV
'       d²   Xw  r p\        P                  ! V
P                  V
P                  V
R7      pV^,          R8X  d   \        P                  ! 4       pM2V^@8X  d   \        P                  ! 4       pM\        P                  ! 4       p\        P                  P                  VVVVV.VR7      pV# \        P                  P                  VVWÜ.VR7      pV#   \          d    Rp EL\i ; i  \          d    Rp
 ELdi ; i)a´  
Build a PyArrow array from the passed buffer.

Parameters
----------
buffer : ColumnBuffers
    Dictionary containing tuples of underlying buffers and
    their associated dtype.
data_type : Tuple[DtypeKind, int, str, str],
    Dtype description of the column as a tuple ``(kind, bit-width, format string,
    endianness)``.
length : int
    The number of values in the array.
describe_null: ColumnNullType
    Null representation the column dtype uses,
    as a tuple ``(kind, value)``
offset : int, default: 0
    Number of elements to offset from the start of the buffer.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Array

Notes
-----
The returned array doesn't own the memory. The caller of this function
is responsible for keeping the memory owner object alive as long as
the returned PyArrow array is being used.
rK   ÚvalidityNÚoffsets©ÚbaseÚU©rH   )Ú	TypeErrorr   Úforeign_bufferÚptrÚbufsizeÚvalidity_buffer_from_maskÚvalidity_buffer_nan_sentinelrq   Úlarge_stringÚstringÚArrayÚfrom_buffers)rI   rJ   rs   rG   rH   r   Ú	data_buffr\   Úvalidity_buffÚvalidity_dtypeÚoffset_buffÚoffset_dtypeÚdata_pa_bufferÚvalidity_pa_buffÚ
data_dtypeÚoffset_bit_widthÚoffset_pa_bufferÚstring_typeÚarrays   &&&&&&             r   rE   rE   @  s¢  € ðP ˜6•?�L€IðØ(/°
Õ(;Ñ%ˆðØ$+¨IÕ$6Ñ!ˆô
 ×&Ò& y§}¡}°i×6GÑ6GØ,5ô7€N÷ Ü4°]Ø5CØ5BØ5;Ø5;Ø5?óAÑô 8¸Ø8AØ8EØ8>Ø8>Ø8BóDÐô ˜yÓ)€JçØ$0Ñ!ˆ˜Q ô ×,Ò,¨[¯_©_Ø-8×-@Ñ-@Ø2=ô?Ðð �Q�<˜3ÔÜŸ/š/Ó+‰Kà 2Ô%Ü ŸošoÓ/‘ä Ÿiši›k�Ü—‘×%Ñ%ØØØÐ/°Ð@Øð	 &ó 
ˆð €Lô —‘×%Ñ%ØØØÐ.Øð	 &ó 
ˆð €Løôw ô Ø‹ðûô ô Ø‹ðús"   �E$ ™E8 Å$E5Å4E5Å8F	ÆF	c               ó4   € V ^8„  d   QhRRRRRRRRR	RR
RRR/# )r   r‡   ÚBufferObjectrˆ   r	   rG   r   rs   rt   rH   r   r*   r   ú	pa.Bufferr   )r   s   "r   r   r   ©  s`   € ÷ LJñ LJØðLJàðLJð "ðLJð ð	LJð
 ðLJð ðLJð ñLJr   c                óÐ  € Vw  rgVw  p  p	V\         P                  8X  g   Q hV\        P                  8X  d   R# V\        P                  8X  g   V\        P
                  8X  Ed-   V^8X  Ed%   \        P                  ! V P                  V P                  V R7      p
V\        P                  8X  dw   V'       g   \        R4      h\        P                  P                  \        P                  ! 4       VRV
.VR7      p\        P                  ! V\        P                   ! 4       4      pM8\        P                  P                  \        P                   ! 4       VRV
.VR7      pV^8X  d   \        P"                  ! V4      pVP%                  4       ^,          # V\        P
                  8X  d5   V^ 8X  d.   \        P                  ! V P                  V P                  V R7      # \'        V R24      h)aÃ  
Build a PyArrow buffer from the passed mask buffer.

Parameters
----------
validity_buff : BufferObject
    Tuple of underlying validity buffer and associated dtype.
validity_dtype : Dtype
    Dtype description as a tuple ``(kind, bit-width, format string,
    endianness)``.
describe_null : ColumnNullType
    Null representation the column dtype uses,
    as a tuple ``(kind, value)``
length : int
    The number of values in the array.
offset : int, default: 0
    Number of elements to offset from the start of the buffer.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Buffer
Nrx   úYTo create a bitmask a copy of the data is required which is forbidden by allow_copy=Falser{   ú* null representation is not yet supported.)r   r6   r   ÚNON_NULLABLEÚUSE_BYTEMASKÚUSE_BITMASKr   r}   r~   r   rN   r„   r…   Úint8rO   rP   rQ   ÚinvertrI   r:   )r‡   rˆ   rG   rs   rH   r   Ú	null_kindÚsentinel_valÚvalidity_kindr\   ÚbuffÚmaskÚ	mask_bools   &&&&&&       r   r€   r€   ©  s¥  € ðB ,Ñ€IØ+Ñ€M�1�a˜ØœIŸN™NÔ*Ð*Ð*à”N×/Ñ/Ô/ñ à	”n×1Ñ1Ô	1Ø”^×/Ñ/Õ/°LÀAÕ4Eä× Ò  ×!2Ñ!2Ø!.×!6Ñ!6Ø&3ô5ˆð œ×3Ñ3Ô3ßÜ"ðFóð ô —8‘8×(Ñ(¬¯ª«°FØ*.°¨Ø06ð )ó 8ˆDô Ÿš ¤b§h¢h£jÓ1‰IäŸ™×-Ñ-¬b¯hªh«j¸&Ø/3°T¨lØ5;ð .ó =ˆIð ˜1ÔÜŸ	š	 )Ó,ˆIà× Ñ Ó" 1Õ%Ð%à	”n×0Ñ0Ô	0°\ÀQÔ5FÜ× Ò  ×!2Ñ!2Ø!.×!6Ñ!6Ø&3ô5ð 	5ô "ØˆoÐGÐHóJð 	Jr   c               ó4   € V ^8„  d   QhRRRRRRRRR	RR
RRR/# )r   r‹   r“   rJ   r	   rG   r   rs   rt   rH   r   r*   r   r”   r   )r   s   "r   r   r   ø  s`   € ÷ UJñ UJØ ðUJàðUJð "ðUJð ð	UJð
 ðUJð ðUJð ñUJr   c                ój  € Vw  rg p\        V4      p	Vw  r«V
\        P                  8X  d©   V'       g   \        R4      hV\        P
                  8X  d   V^8X  d   \        V RV
 R24      h\        P                  P                  V	VRV .VR7      p\        P                  ! V4      p\        P                  ! V4      pVP                  4       ^,          # V
\        P                  8X  d©   V'       g   \        R4      hV\        P                  8X  d   \        P                   ! 4       pMT	p\        P                  P                  VVRV .VR7      p\        P"                  ! WË4      p\        P                  ! V4      pVP                  4       ^,          # V
\        P$                  8X  d   R# \        V R24      h)a¦  
Build a PyArrow buffer from NaN or sentinel values.

Parameters
----------
data_pa_buffer : pa.Buffer
    PyArrow buffer for the column data.
data_type : Dtype
    Dtype description as a tuple ``(kind, bit-width, format string,
    endianness)``.
describe_null : ColumnNullType
    Null representation the column dtype uses,
    as a tuple ``(kind, value)``
length : int
    The number of values in the array.
offset : int, default: 0
    Number of elements to offset from the start of the buffer.
allow_copy : bool, default: True
    Whether to allow copying the memory to perform the conversion
    (if false then zero-copy approach is requested).

Returns
-------
pa.Buffer
r–   z with rj   Nr{   r—   )rq   r   ÚUSE_NANrN   r   r2   r:   r   r„   r…   rO   Úis_nanrœ   rI   ÚUSE_SENTINELr4   Úint64Úequalr˜   )r‹   rJ   rG   rs   rH   r   rm   rn   r\   r�   r�   rž   Úpyarrow_datar¡   Úsentinel_dtypeÚsentinel_arrr¢   s   &&&&&&           r   r�   r�   ø  s¥  € ðB &Ñ€D�Q˜Ü˜yÓ)€JØ+Ñ€Ið ”N×*Ñ*Ô*ßÜðBóð ð
 ”9—?‘?Ô" y°B¤ô &Ø�+˜V I ;Ð.DÐEóGð Gô Ÿ8™8×0Ñ0ØØØ�~Ð&Øð	 1ó ˆLô —9’9˜\Ó*ˆDÜ—9’9˜T“?ˆDØ—<‘<“> !Õ$Ð$ð 
”n×1Ñ1Ô	1ßÜðBóð ð
 ”9×%Ñ%Ô%ÜŸXšX›Z‰Nà'ˆNÜ—x‘x×,Ñ,¨^Ø-3Ø.2°NÐ-CØ4:ð -ó <ˆô —x’x Ó;ˆÜ—I’I˜lÓ+ˆ	Ø× Ñ Ó" 1Õ%Ð%à	”n×1Ñ1Ô	1Ùä!ØˆoÐGÐHóJð 	Jr   )T)r   T)3Ú__conditional_annotations__Ú
__future__r   Útypingr   r   Úpyarrow.interchange.columnr   r   r   Úpyarrowr   ra   Úpyarrow.computeÚcomputerO   r	   r   rA   r“   r0   r›   Úint16Úint32r¨   r1   Úuint8Úuint16Úuint32Úuint64r2   Úfloat16Úfloat32Úfloat64r6   rQ   r3   rƒ   r
   Ú__annotations__r    r   r$   r5   r7   r9   rh   rq   rE   r€   r�   )r­   s   @r   Ú<module>r¾      sn  øð÷$ #Ð "÷÷
ñ ó Û 	å Ý ,ð
 €Ø€Ø€ð ‡M�M�A�r—w’w“yØ˜Ÿš›
Ø˜Ÿš›
Ø˜Ÿš›
ð$ð ‡N�N�Q˜Ÿš›
Ø˜Ÿš›Ø˜Ÿš›Ø˜Ÿš›ð&ð ‡O�O�b˜"Ÿ*š*›,Ø˜"Ÿ*š*›,Ø˜"Ÿ*š*›,ð(ð ‡N�N�Q˜Ÿš›
Ø˜Ÿš›
ð$à×Ñ�q˜"Ÿ)š)›+Ð&ð4€Ð0ó ÷$2÷:*÷:,/÷^÷:$÷N-ò`Oò$E÷$f÷RLJ÷^UJñ UJr   