+
    QV-jh  ã                   óÜ  € ^ RI t ^ RIt^ RIHtHtHt ^ RIHt ^ RIH	t	H
t
HtHtHtHt ^ RIt^ RIt^ RIt^RIHt ^RIHtHtHtHt ^RIHt ^RIHt ]! R	4      t ]! R
4      t!]! R4      t"]! R4      t#R R lt$R R lt%R R lt&R R lt'R R lt( ! R R]]!]"]#3,          4      t)R R lt* ! R R])]P:                  ]PV                  ]P:                  3,          4      t, ! R R])]-].]-3,          4      t/ ! R R ])]-]P`                  ]-3,          4      t1 ! R! R"])]Pd                  ]Pf                  ]Pd                  3,          4      t4 ! R# R$4      t5 ! R% R&4      t6 ! R' R(]4      t7 ! R) R*]74      t8 ! R+ R,]74      t9 ! R- R.]]!]"]#3,          4      t: ! R/ R0]:]!]"]#3,          4      t; ! R1 R2]:]!]"]#3,          4      t< ! R3 R4]<]P:                  ]PV                  ]P:                  3,          4      t= ! R5 R6]:]].]3,          4      t> ! R7 R8]<]Pd                  ]Pf                  ]Pd                  3,          4      t? ! R9 R:]:]-]"]-3,          4      t@R; R< ltAR= R> ltBR? R@ ltCRERA RB lltDRFRC RD lltER# )Gé    N)ÚIterableÚMappingÚMutableMapping)Úpartial)ÚAnyÚCallableÚGenericÚOptionalÚTypeVarÚUnion)ÚFeatures)Ú_ArrayXDExtensionTypeÚ_is_zero_copy_onlyÚdecode_nested_exampleÚpandas_types_mapper)ÚTable)Úno_op_if_value_is_nullÚTÚ	RowFormatÚColumnFormatÚBatchFormatc                ó0   € V ^8„  d   QhR\         R\        /# ©é   ÚkeyÚreturn)ÚrangeÚbool)Úformats   "Úo/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/datasets/formatting/formatting.pyÚ__annotate__r!   (   s   € ÷ 3ñ 3œeð 3¬ñ 3ó    c                 ób   € V P                   ^8H  ;'       d    V P                  V P                  8¬  # )é   )ÚstepÚstopÚstart©r   s   &r    Ú_is_range_contiguousr)   (   s%   € Ø�8‰8�q‰=×2Ð2˜SŸX™X¨¯©Ñ2Ð2r"   c                ó$   € V ^8„  d   QhR\         /# )r   r   )r   )r   s   "r    r!   r!   ,   s   € ÷ ñ œSñ r"   c                 ó8   € \        R V  R\        V 4       R24      h)zWrong key type: 'z' of type 'z6'. Expected one of int, slice, range, str or Iterable.)Ú	TypeErrorÚtyper(   s   &r    Ú_raise_bad_key_typer.   ,   s&   € Ü
Ø
˜C˜5 ¬D°«I¨;Ð6lÐmóð r"   c          	      óœ   € V ^8„  d   QhR\         R\        \        \        \        \
        \        3,          R\         R\        P                   /# ©r   Útabler   Úindicesr   ©r   r   ÚintÚslicer   Ústrr   Úpa)r   s   "r    r!   r!   2   s@   € ÷ ñ ÜðÜœS¤%¬´´XÐ=Õ>ðÜINðä‡X�Xñr"   c           
     ó   € \        V\        4      '       dR   VP                  WP                  ,          ^4      P	                  ^ 4      ^ ,          P                  4       p\        W4      # \        V\        4      '       d#   \        VP                  VP                  4      !  p\        V\        4      '       d�   \        V4      '       d~   VP                  ^ 8¼  dm   \        YP                  VP                  VP                  VP                  ,
          4      P	                  ^ 4       Uu. uF  q3P                  4       NK  	  up4      #  \        V\        4      '       d;   V P                  V.4      p \        WP	                  ^ 4      P                  4       4      # \        V\         4      '       dO   \        Y Uu. uF8  q2P                  V^4      P	                  ^ 4      ^ ,          P                  4       NK:  	  up4      # \#        V4       R# u upi u upi )a1  
Query a pyarrow Table to extract the subtable that correspond to the given key.
The :obj:`indices` parameter corresponds to the indices mapping in case we cant to take into
account a shuffling or an indices selection for example.
The indices table must contain one column named "indices" of type uint64.
N)Ú
isinstancer4   Ú
fast_sliceÚnum_rowsÚcolumnÚas_pyÚ_query_tabler5   r   r2   r)   r'   r&   r6   ÚselectÚ	to_pylistr   r.   )r1   r   r2   Úis   &&& r    Ú!_query_table_with_indices_mappingrB   2   sŽ  € ô �#”s×ÒØ× Ñ  ×'7Ñ'7Õ!7¸Ó;×BÑBÀ1ÓEÀaÕH×NÑNÓPˆÜ˜EÓ'Ð'Ü�#”u×ÒÜ�S—[‘[ ×!1Ñ!1Ó2Ñ3ˆÜ�#”u×ÒÜ ×$Ò$¨¯©°a¬ÜØ×+=Ñ+=¸c¿i¹iÈÏÉÐTW×T]ÑT]ÕI]Ó+^×+eÑ+eÐfgÔ+hÓiÑ+h aŸ™ž	Ñ+hÑióð ð Ü�#”s×ÒØ—‘˜c˜UÓ#ˆÜ˜E§>¡>°!Ó#4×#>Ñ#>Ó#@ÓAÐAÜ�#”x× Ò Ü˜EÐ[^Ó#_Ñ[^ÐVW×$6Ñ$6°q¸!Ó$<×$CÑ$CÀAÓ$FÀqÕ$I×$OÑ$OÖ$QÑ[^Ñ#_Ó`Ð`ä˜Öùò jùò $`s   Ä%H
Æ4>H
c          	      ó�   € V ^8„  d   QhR\         R\        \        \        \        \
        \        3,          R\        P                   /# )r   r1   r   r   r3   )r   s   "r    r!   r!   P   s8   € ÷ ñ œð ¤E¬#¬u´e¼SÄ(Ð*JÕ$Kð ÔPR×PXÑPXñ r"   c                óœ  € \        V\        4      '       d#   V P                  WP                  ,          ^4      # \        V\        4      '       d#   \        VP                  V P                  4      !  p\        V\
        4      '       d[   \        V4      '       dI   VP                  ^ 8¼  d8   V P                  VP                  VP                  VP                  ,
          4      #  \        V\        4      '       d>   V P                  P                  V P                   Uu. uF  q"V8w  g   K  VNK  	  up4      # \        V\        4      '       ds   \        P                   ! V\        P"                  4      p\%        V4      ^ 8X  d   V P                  P	                  ^ ^ 4      # V P'                  WP                  ,          4      # \)        V4       R# u upi )zQ
Query a pyarrow Table to extract the subtable that correspond to the given key.
N)r9   r4   r:   r;   r5   r   r2   r)   r'   r&   r6   r1   ÚdropÚcolumn_namesr   ÚnpÚfromiterÚint64ÚlenÚfast_gatherr.   )r1   r   r<   s   && r    r>   r>   P   sA  € ô �#”s×ÒØ×Ñ §n¡nÕ 4°aÓ8Ð8Ü�#”u×ÒÜ�S—[‘[ §¡Ó0Ñ1ˆÜ�#”u×ÒÜ ×$Ò$¨¯©°a¬Ø×#Ñ# C§I¡I¨s¯x©x¸#¿)¹)Õ/CÓDÐDàÜ�#”s×ÒØ�{‰{×Ñ°e×6HÒ6HÓ ZÑ6H¨FÐVYÉM§ Ñ6HÑ ZÓ[Ð[Ü�#”x× Ò Ü�kŠk˜#œrŸx™xÓ(ˆÜˆs‹8�qŒ=Ø—;‘;×$Ñ$ Q¨Ó*Ð*à× Ñ  §~¡~Õ!5Ó6Ð6ä˜Öùò ![s   ÄG	Ä'G	c                óD   € V ^8„  d   QhR\         P                  R\        /# ©r   Úpa_arrayr   )r7   ÚArrayr   )r   s   "r    r!   r!   i   s   € ÷ #ñ #¤2§8¡8ð #´ñ #r"   c                 ó    € V P                   ^ 8„  # ©r   )Ú
null_count)rN   s   &r    Ú_is_array_with_nullsrS   i   s   € Ø×Ñ Ñ"Ð"r"   c                   óZ   a € ] tR t^mt o RtV 3R lR ltV 3R lR ltV 3R lR ltRtV t	R	# )
ÚBaseArrowExtractorz°
Arrow extractor are used to extract data from pyarrow tables.
It makes it possible to extract rows, columns and batches.
These three extractions types have to be implemented.
c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# ©r   Úpa_tabler   ©r7   r   r   )r   Ú__classdict__s   "€r    r!   ÚBaseArrowExtractor.__annotate__t   s   ø€ ÷ "ñ "¡B§H¡Hð "±ñ "r"   c                ó   € \         h©N©ÚNotImplementedError©ÚselfrX   s   &&r    Úextract_rowÚBaseArrowExtractor.extract_rowt   ó   € Ü!Ð!r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   ©r7   r   r   )r   rZ   s   "€r    r!   r[   w   s   ø€ ÷ "ñ "¡r§x¡xð "±Lñ "r"   c                ó   € \         hr]   r^   r`   s   &&r    Úextract_columnÚ!BaseArrowExtractor.extract_columnw   rd   r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   ©r7   r   r   )r   rZ   s   "€r    r!   r[   z   s   ø€ ÷ "ñ "¡b§h¡hð "±;ñ "r"   c                ó   € \         hr]   r^   r`   s   &&r    Úextract_batchÚ BaseArrowExtractor.extract_batchz   rd   r"   © N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rb   rh   rm   Ú__static_attributes__Ú__classdictcell__©rZ   s   @r    rU   rU   m   s(   ø‡ € ñ÷"ð "÷"ð "÷"ö "r"   rU   c                óŠ   € V ^8„  d   QhR\         \        \        \        ,          3,          R\         \        \        3,          /# )r   Úpy_dictr   )Údictr6   Úlistr   )r   s   "r    r!   r!   ~   s/   € ÷ =ñ =”Tœ#œt¤A�w˜,Õ'ð =¬D´´a°­Lñ =r"   c                ód   € V P                  4        UUu/ uF  w  rW^ ,          bK  	  upp# u uppi )z:Return the first element of a batch (dict) as a row (dict))Úitems)ry   r   Úarrays   &  r    Ú_unnestr   ~   s(   € à,3¯M©M¬OÔ<©O™j˜cˆC�q•ŠM©OÒ<Ð<ùÓ<s   ”,c                   óV   a € ] tR t^ƒt o V 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )	ÚSimpleArrowExtractorc                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rW   ©r7   r   )r   rZ   s   "€r    r!   Ú!SimpleArrowExtractor.__annotate__„   s#   ø€ ÷ ñ ¡B§H¡Hð ±·±ñ r"   c                ó   € V# r]   ro   r`   s   &&r    rb   Ú SimpleArrowExtractor.extract_row„   ó   € Øˆr"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rW   ©r7   r   rO   )r   rZ   s   "€r    r!   r„   ‡   s#   ø€ ÷ "ñ "¡r§x¡xð "±B·H±Hñ "r"   c                ó$   € VP                  ^ 4      # rQ   )r<   r`   s   &&r    rh   Ú#SimpleArrowExtractor.extract_column‡   s   € Ø�‰˜qÓ!Ð!r"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rW   rƒ   )r   rZ   s   "€r    r!   r„   Š   s#   ø€ ÷ ñ ¡b§h¡hð ±2·8±8ñ r"   c                ó   € V# r]   ro   r`   s   &&r    rm   Ú"SimpleArrowExtractor.extract_batchŠ   r‡   r"   ro   N©	rp   rq   rr   rs   rb   rh   rm   ru   rv   rw   s   @r    r�   r�   ƒ   s#   ø‡ € ÷ð ÷"ð "÷ö r"   r�   c                   óV   a € ] tR t^Žt o V 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )	ÚPythonArrowExtractorc                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   ©r7   r   rz   )r   rZ   s   "€r    r!   Ú!PythonArrowExtractor.__annotate__�   s   ø€ ÷ -ñ -¡B§H¡Hð -±ñ -r"   c                ó4   € \        VP                  4       4      # r]   )r   Ú	to_pydictr`   s   &&r    rb   Ú PythonArrowExtractor.extract_row�   s   € Ü�x×)Ñ)Ó+Ó,Ð,r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   ©r7   r   r{   )r   rZ   s   "€r    r!   r”   ’   s   ø€ ÷ .ñ .¡r§x¡xð .±Dñ .r"   c                ó@   € VP                  ^ 4      P                  4       # rQ   )r<   r@   r`   s   &&r    rh   Ú#PythonArrowExtractor.extract_column’   s   € Ø�‰˜qÓ!×+Ñ+Ó-Ð-r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   r“   )r   rZ   s   "€r    r!   r”   •   s   ø€ ÷ $ñ $¡b§h¡hð $±4ñ $r"   c                ó"   € VP                  4       # r]   )r–   r`   s   &&r    rm   Ú"PythonArrowExtractor.extract_batch•   s   € Ø×!Ñ!Ó#Ð#r"   ro   Nr�   rw   s   @r    r‘   r‘   Ž   s#   ø‡ € ÷-ð -÷.ð .÷$ö $r"   r‘   c                   ón   a € ] tR t^™t o R tV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltR
t	V t
R# )ÚNumpyArrowExtractorc                ó   € Wn         R # r]   ©Únp_array_kwargs)ra   r£   s   &,r    Ú__init__ÚNumpyArrowExtractor.__init__š   s   € Ø.Ör"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   r“   )r   rZ   s   "€r    r!   Ú NumpyArrowExtractor.__annotate__�   s   ø€ ÷ 5ñ 5¡B§H¡Hð 5±ñ 5r"   c                ó6   € \        V P                  V4      4      # r]   )r   rm   r`   s   &&r    rb   ÚNumpyArrowExtractor.extract_row�   s   € Ü�t×)Ñ)¨(Ó3Ó4Ð4r"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rW   )r7   r   rG   Úndarray)r   rZ   s   "€r    r!   r§       s'   ø€ ÷ Nñ N¡r§x¡xð N±B·J±Jñ Nr"   c                óR   € V P                  WP                  ^ ,          ,          4      # rQ   )Ú_arrow_array_to_numpyrF   r`   s   &&r    rh   Ú"NumpyArrowExtractor.extract_column    s!   € Ø×)Ñ)¨(×3HÑ3HÈÕ3KÕ*LÓMÐMr"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   r“   )r   rZ   s   "€r    r!   r§   £   s#   ø€ ÷ añ a¡b§h¡hð a±4ñ ar"   c                ón   € VP                    Uu/ uF  q"V P                  W,          4      bK  	  up# u upi r]   )rF   r­   )ra   rX   Úcols   && r    rm   Ú!NumpyArrowExtractor.extract_batch£   s2   € ØJR×J_ÒJ_Ó`ÑJ_À3�T×/Ñ/°µÓ>Ò>ÑJ_Ñ`Ð`ùÒ`s   � 2c                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rM   )r7   rO   rG   r«   )r   rZ   s   "€r    r!   r§   ¦   s#   ø€ ÷ $/ñ $/©b¯h©hð $/¹2¿:¹:ñ $/r"   c                óü  a€ \        V\        P                  4      '       Ed   \        VP                  \        4      '       dY   \        VP                  P                  R R7      pVP                   UUu. uF  q3P                  VR7       F  qDNK  	  K  	  uppoEM<\        VP                  4      ;'       dI    \        ;QJ d&    R VP                   4       F  '       d   K   RM	  R M! R VP                   4       4      pVP                   UUu. uF  q3P                  VR7       F  qDNK  	  K  	  uppoM¡\        VP                  \        4      '       d5   \        VP                  P                  R R7      pVP                  VR7      oMM\        VP                  4      ;'       d    \        V4      '       * pVP                  VR7      P                  4       o\        S4      ^ 8”  d¬   \        ;QJ d    V3R lS 4       F  '       g   K   R M	  RM! V3R lS 4       4      '       dl   \        P                  P!                  \        P"                  4      R8¼  d   \        P$                  ! S\&        R7      # \        P(                  ! SR\&        R7      # \        P                  P!                  \        P"                  4      R8¼  d   \        P$                  ! S4      # \        P(                  ! SRR	7      # u uppi u uppi )
T)Úunnest)Úzero_copy_onlyc              3   óB   "  € T F  p\        V4      '       * x € K  	  R # 5ir]   )rS   )Ú.0Úchunks   & r    Ú	<genexpr>Ú<NumpyArrowExtractor._arrow_array_to_numpy.<locals>.<genexpr>¯   s    é € ð KÙAP¸Ô,¨UÓ3×3Ñ3Ãùs   ‚Fc              3   óJ  <"  € T F˜  p\        V\        P                  4      ;'       dD    VP                  \        8H  ;'       gW    VP
                  S^ ,          P
                  8g  ;'       g/    \        V\        4      ;'       d    \        P                  ! V4      x € Kš  	  R# 5i©r   N)r9   rG   r«   ÚdtypeÚobjectÚshapeÚfloatÚisnan)r¸   Úxr~   s   & €r    rº   r»   ¿   s   øé € ð ñ �Aô ˜AœrŸz™zÓ*×_Ð_°·±¼6Ñ0A÷ :Ð0^ÀQÇWÁWÐPUÐVWÕPX×P^ÑP^ÑE^÷ :ð :Ü˜q¤%Ó(×8Ð8¬R¯XªX°a«[ô:ãùs   ƒ%B#©B#Á'B#Á,B#ÂB#z2.0.0b1)r¾   )Úcopyr¾   ©rÄ   )r9   r7   ÚChunkedArrayr-   r   r   Ústorage_dtypeÚchunksÚto_numpyÚallrS   ÚtolistrJ   ÚanyrG   ÚlibÚNumpyVersionÚ__version__Úasarrayr¿   r~   )ra   rN   r¶   r¹   Úrowr~   s   &&   @r    r­   Ú)NumpyArrowExtractor._arrow_array_to_numpy¦   s-  ø€ Ü�h¤§¡×0Ó0Ü˜(Ÿ-™-Ô)>×?Ò?ä!3°H·M±M×4OÑ4OÐX\Ô!]�à%-§_¢_ôÙ%4˜EÇÁÐ^lÀÖ@m¸’CÑ@m‘C¡_ò’ô "4°H·M±MÓ!B÷ "ð "ÇsÃsñ KØAIÇÂóKÇsÇsÂsñ KØAIÇÂóKó H�ð &.§_¢_ôÙ%4˜EÇÁÐ^lÀÖ@m¸’CÑ@m‘C¡_ò‘ô ˜(Ÿ-™-Ô)>×?Ò?ä!3°H·M±M×4OÑ4OÐX\Ô!]�Ø&×/Ñ/¸~Ð/ÓN‘ä!3°H·M±MÓ!B×!iÐ!iÔK_Ð`hÓKiÔGi�Ø&×/Ñ/¸~Ð/ÓN×UÑUÓW�äˆu‹:˜Œ>ß‹sô ñ ó�s�sŠsô ñ ó÷ ò ô
 —6‘6×&Ñ&¤r§~¡~Ó6¸)ÔCÜŸ:š: e´6Ô:Ð:Ü—x’x ¨E¼Ô@Ð@Ü�6‰6×ÑœrŸ~™~Ó.°)Ô;Ü—:’:˜eÓ$Ð$ä—8’8˜E¨Ô.Ð.ùó?ùós   Á3"K2Ä"K8r¢   N)rp   rq   rr   rs   r¤   rb   rh   rm   r­   ru   rv   rw   s   @r    r    r    ™   s6   ø‡ € ò/÷5ð 5÷Nð N÷að a÷$/ö $/r"   r    c                   óV   a € ] tR t^Ít o V 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )	ÚPandasArrowExtractorc                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rW   ©r7   r   ÚpdÚ	DataFrame)r   rZ   s   "€r    r!   Ú!PandasArrowExtractor.__annotate__Î   s'   ø€ ÷ Tñ T¡B§H¡Hð T±·±ñ Tr"   c                óN   € VP                  ^R7      P                  \        R7      # )r$   )Úlength©Útypes_mapper)r5   Ú	to_pandasr   r`   s   &&r    rb   Ú PandasArrowExtractor.extract_rowÎ   s"   € Ø�~‰~ Qˆ~Ó'×1Ñ1Ô?RÐ1ÓSÐSr"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rW   ©r7   r   r×   ÚSeries)r   rZ   s   "€r    r!   rÙ   Ñ   s'   ø€ ÷ jñ j¡r§x¡xð j±B·I±Iñ jr"   c                ó~   € VP                  ^ .4      P                  \        R7      VP                  ^ ,          ,          # )r   rÜ   )r?   rÞ   r   rF   r`   s   &&r    rh   Ú#PandasArrowExtractor.extract_columnÑ   s4   € Ø�‰ ˜sÓ#×-Ñ-Ô;NÐ-ÓOÐPX×PeÑPeÐfgÕPhÕiÐir"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rW   rÖ   )r   rZ   s   "€r    r!   rÙ   Ô   s'   ø€ ÷ Dñ D¡b§h¡hð D±2·<±<ñ Dr"   c                ó.   € VP                  \        R 7      # )rÜ   )rÞ   r   r`   s   &&r    rm   Ú"PandasArrowExtractor.extract_batchÔ   s   € Ø×!Ñ!Ô/BÐ!ÓCÐCr"   ro   Nr�   rw   s   @r    rÔ   rÔ   Í   s)   ø‡ € ÷Tð T÷jð j÷Dö Dr"   rÔ   c                   ól   a € ] tR t^Øt o RV 3R lR lltV 3R lR ltV 3R lR ltV 3R lR	 ltR
tV t	R# )ÚPythonFeaturesDecoderNc          
      ót   <€ V ^8„  d   QhRS[ S[,          RS[ S[S[S[S[S[R3,          3,          ,          /# ©r   ÚfeaturesÚtoken_per_repo_idN©r
   r   rz   r6   r   r   )r   rZ   s   "€r    r!   Ú"PythonFeaturesDecoder.__annotate__Ù   sA   ø€ ÷ 3ñ 3Ù ¡Õ*ð3Ù?GÉÉSÑRWÑX[Ñ]aÐcgÐXgÕRhÐMhÕHiÕ?jñ3r"   c                ó   € Wn         W n        R # r]   ©rì   rí   ©ra   rì   rí   s   &&&r    r¤   ÚPythonFeaturesDecoder.__init__Ù   s   € ð !ŒØ!2Ör"   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# ©r   rÑ   r   ©rz   )r   rZ   s   "€r    r!   rï   ß   s   ø€ ÷ uñ u™dð u¡tñ ur"   c                óv   € V P                   '       d'   V P                   P                  WP                  R 7      # T# ©)rí   )rì   Údecode_examplerí   )ra   rÑ   s   &&r    Ú
decode_rowÚ PythonFeaturesDecoder.decode_rowß   s1   € Ø^b×^k×^kÐ^kˆt�}‰}×+Ñ+¨C×CYÑCYÐ+ÓZÐtÐqtÐtr"   c                ó,   <€ V ^8„  d   QhRS[ RS[RS[ /# ©r   r<   Úcolumn_namer   )r{   r6   )r   rZ   s   "€r    r!   rï   â   s"   ø€ ÷ 
ñ 
¡Dð 
±sð 
¹tñ 
r"   c                óx   € V P                   '       d(   V P                   P                  WV P                  R 7      # T# rø   )rì   Údecode_columnrí   )ra   r<   rþ   s   &&&r    r   Ú#PythonFeaturesDecoder.decode_columnâ   s;   € ð �}�}ˆ}ð �M‰M×'Ñ'¨Èt×OeÑOeÐ'Ófð	
ð ð	
r"   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# ©r   Úbatchr   rö   )r   rZ   s   "€r    r!   rï   é   s   ø€ ÷ wñ w¡$ð w©4ñ wr"   c                óv   € V P                   '       d'   V P                   P                  WP                  R 7      # T# rø   )rì   Údecode_batchrí   ©ra   r  s   &&r    r  Ú"PythonFeaturesDecoder.decode_batché   s1   € Ø^b×^k×^kÐ^kˆt�}‰}×)Ñ)¨%×CYÑCYÐ)ÓZÐvÐqvÐvr"   rñ   r]   ©
rp   rq   rr   rs   r¤   rú   r   r  ru   rv   rw   s   @r    ré   ré   Ø   s1   ø‡ € ÷3ò 3÷uð u÷
ð 
÷wö wr"   ré   c                   óh   a € ] tR t^ít o V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltR	tV t	R
# )ÚPandasFeaturesDecoderc                ó0   <€ V ^8„  d   QhRS[ S[,          /# )r   rì   )r
   r   )r   rZ   s   "€r    r!   Ú"PandasFeaturesDecoder.__annotate__î   s   ø€ ÷ !ñ !¡©(Õ!3ñ !r"   c                ó   € Wn         R # r]   ©rì   )ra   rì   s   &&r    r¤   ÚPandasFeaturesDecoder.__init__î   s   € Ø Žr"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rõ   ©r×   rØ   )r   rZ   s   "€r    r!   r  ñ   s#   ø€ ÷ ñ ™bŸl™lð ©r¯|©|ñ r"   c                óv  € V P                   '       dl   V P                   P                  4        UUu/ uFD  w  r#V P                   P                  V,          '       g   K*  V\        \	        \
        V4      4      bKF  	  uppM/ pV'       d,   VP                  V4      V\        VP                  4       4      &   V# u uppi r]   )	rì   r}   Ú_column_requires_decodingr   r   r   Ú	transformr{   Úkeys)ra   rÑ   rþ   ÚfeatureÚdecodes   &&   r    rú   Ú PandasFeaturesDecoder.decode_rowñ   s�   € ð �}�}ˆ}ð -1¯M©M×,?Ñ,?Ô,Aôá,AÑ(�KØ—=‘=×:Ñ:¸;×GÑGô ]�Ô3´GÔ<QÐSZÓ4[Ó\Ò\Ù,Aóð ð 	÷ Ø'*§}¡}°VÓ'<ˆC”�V—[‘[“]Ó#Ñ$Øˆ
ùós   °'B5ÁB5c                óT   <€ V ^8„  d   QhRS[ P                  RS[RS[ P                  /# rý   )r×   râ   r6   )r   rZ   s   "€r    r!   r  ÿ   s*   ø€ ÷ ñ ¡B§I¡Ið ¹Cð ÁBÇIÁIñ r"   c                ó  € V P                   '       d^   W P                   9   dN   V P                   P                  V,          '       d+   \        \        \        V P                   V,          4      4      MR pV'       d   VP                  V4      pV# r]   )rì   r  r   r   r   r  )ra   r<   rþ   r  s   &&& r    r   Ú#PandasFeaturesDecoder.decode_columnÿ   si   € ð �}�}ˆ} ·±Ô!=À$Ç-Á-×BiÑBiÐju×BvÔBvô #¤7Ô+@À$Ç-Á-ÐP[ÕB\Ó#]Ô^àð 	÷
 Ø×%Ñ% fÓ-ˆFØˆr"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# r  r  )r   rZ   s   "€r    r!   r  	  s#   ø€ ÷ &ñ &¡"§,¡,ð &±2·<±<ñ &r"   c                ó$   € V P                  V4      # r]   )rú   r  s   &&r    r  Ú"PandasFeaturesDecoder.decode_batch	  s   € Ø�‰˜uÓ%Ð%r"   r  Nr	  rw   s   @r    r  r  í   s-   ø‡ € ÷!ð !÷ð ÷ð ÷&ö &r"   r  c                   óª   a € ] tR tRt o RtV 3R lR ltR tR tR tV 3R lR	 lt	R
 t
R tR tR tR tR tR tR t]RR l4       tR tR tRtV tR# )ÚLazyDicti  zeA dictionary backed by Arrow data. The values are formatted on-the-fly when accessing the dictionary.c                ó8   <€ V ^8„  d   QhRS[ P                  RR/# )r   rX   Ú	formatterÚ	Formatterrƒ   )r   rZ   s   "€r    r!   ÚLazyDict.__annotate__  s   ø€ ÷ 4ñ 4¡§¡ð 4°kñ 4r"   c                ó¶   € Wn         W n        \        P                  VP                  4      V n        \        V P
                  P                  4       4      V n        R # r]   )	rX   r#  rz   ÚfromkeysrF   ÚdataÚsetr  Úkeys_to_format)ra   rX   r#  s   &&&r    r¤   ÚLazyDict.__init__  s:   € Ø ŒØ"Œä—M‘M (×"7Ñ"7Ó8ˆŒ	Ü! $§)¡)§.¡.Ó"2Ó3ˆÖr"   c                ó,   € \        V P                  4      # r]   )rJ   r(  ©ra   s   &r    Ú__len__ÚLazyDict.__len__  s   € Ü�4—9‘9‹~Ðr"   c                óÀ   € V P                   V,          pWP                  9   d;   V P                  V4      pW P                   V&   V P                  P                  V4       V# r]   )r(  r*  r   Úremove©ra   r   Úvalues   && r    Ú__getitem__ÚLazyDict.__getitem__  sM   € Ø—	‘	˜#•ˆØ×%Ñ%Ô%Ø—K‘K Ó$ˆEØ"�I‰I�c‰NØ×Ñ×&Ñ& sÔ+Øˆr"   c                óx   € WP                   9   d   V P                   P                  V4       W P                  V&   R # r]   ©r*  r1  r(  r2  s   &&&r    Ú__setitem__ÚLazyDict.__setitem__"  s-   € Ø×%Ñ%Ô%Ø×Ñ×&Ñ& sÔ+Ø�	‰	�#‹r"   c                ó   <€ V ^8„  d   QhRR/# )r   r   Nro   )r   rZ   s   "€r    r!   r%  '  s   ø€ ÷ ñ  $ñ r"   c                óv   € WP                   9   d   V P                   P                  V4       V P                  V R # r]   r7  ©ra   r   s   &&r    Ú__delitem__ÚLazyDict.__delitem__'  s-   € Ø×%Ñ%Ô%Ø×Ñ×&Ñ& sÔ+Ø�I‰I�cŠNr"   c                ó,   € \        V P                  4      # r]   )Úiterr(  r-  s   &r    Ú__iter__ÚLazyDict.__iter__,  s   € Ü�D—I‘I‹Ðr"   c                ó   € WP                   9   # r]   )r(  r<  s   &&r    Ú__contains__ÚLazyDict.__contains__/  s   € Ø—i‘iÑÐr"   c                óL   € V P                  4        \        V P                  4      # r]   )Ú_format_allÚreprr(  r-  s   &r    Ú__repr__ÚLazyDict.__repr__2  s   € Ø×ÑÔÜ�D—I‘I‹Ðr"   c                ó  € \        V\        4      '       d†   V P                  4       pVP                  4       pVP                  4        V;P                  VP
                  P                  4       ,          un        VP
                  VP
                  ,          Vn        V# \        V\        4      '       dR   V P                  4       pV;P                  VP                  4       ,          un        VP
                  V,          Vn        V# \        # r]   ©	r9   r!  rÄ   rG  r*  r(  r  rz   ÚNotImplemented©ra   ÚotherÚinsts   && r    Ú__or__ÚLazyDict.__or__6  s°   € Ü�eœX×&Ò&Ø—9‘9“;ˆDØ—J‘J“LˆEØ×ÑÔØ×Ò 5§:¡:§?¡?Ó#4Õ4ÕØŸ	™	 E§J¡JÕ.ˆDŒIØˆKÜ�eœT×"Ò"Ø—9‘9“;ˆDØ×Ò 5§:¡:£<Õ/ÕØŸ	™	 EÕ)ˆDŒIØˆKÜÐr"   c                ó  € \        V\        4      '       d†   V P                  4       pVP                  4       pVP                  4        V;P                  VP
                  P                  4       ,          un        VP
                  VP
                  ,          Vn        V# \        V\        4      '       dQ   V P                  4       pV;P                  VP                  4       ,          un        WP
                  ,          Vn        V# \        # r]   rL  rN  s   && r    Ú__ror__ÚLazyDict.__ror__E  s®   € Ü�eœX×&Ò&Ø—9‘9“;ˆDØ—J‘J“LˆEØ×ÑÔØ×Ò 5§:¡:§?¡?Ó#4Õ4ÕØŸ
™
 T§Y¡YÕ.ˆDŒIØˆKÜ�eœT×"Ò"Ø—9‘9“;ˆDØ×Ò 5§:¡:£<Õ/ÕØ§	¡	Õ)ˆDŒIØˆKÜÐr"   c                óž  € \        V\        4      '       dw   VP                  4       pVP                  4        V ;P                  VP
                  P                  4       ,          un        V ;P
                  VP
                  ,          un        V # V ;P                  VP                  4       ,          un        V ;P
                  V,          un        V # r]   )r9   r!  rÄ   rG  r*  r(  r  )ra   rO  s   &&r    Ú__ior__ÚLazyDict.__ior__T  s‡   € Ü�eœX×&Ò&Ø—J‘J“LˆEØ×ÑÔØ×Ò 5§:¡:§?¡?Ó#4Õ4ÕØ�IŠI˜Ÿ™Õ#�Ið ˆð ×Ò 5§:¡:£<Õ/ÕØ�IŠI˜Õ�IØˆr"   c                óR  € V P                   P                  V P                   4      pVP                  P                  V P                  4       V P                  R ,          P	                  4       VP                  R &   V P                  R,          P	                  4       VP                  R&   V# )r(  r*  )Ú	__class__Ú__new__Ú__dict__ÚupdaterÄ   )ra   rP  s   & r    Ú__copy__ÚLazyDict.__copy___  sw   € à�~‰~×%Ñ% d§n¡nÓ5ˆØ�‰×Ñ˜TŸ]™]Ô+à $§¡¨fÕ 5× :Ñ :Ó <ˆ�‰�fÑØ*.¯-©-Ð8HÕ*I×*NÑ*NÓ*Pˆ�‰Ð&Ñ'Øˆr"   c                ó,   € ^ RI pVP                  V 4      # r½   rÅ   )ra   rÄ   s   & r    rÄ   ÚLazyDict.copyh  s   € Ûà�y‰y˜‹Ðr"   Nc                ó   € \         hr]   r^   )ÚclsÚiterabler3  s   &&&r    r'  ÚLazyDict.fromkeysm  s   € ä!Ð!r"   c                ó   € \         hr]   r^   r<  s   &&r    r   ÚLazyDict.formatq  rd   r"   c                óœ   € V P                    F!  pV P                  V4      V P                  V&   K#  	  V P                   P                  4        R # r]   )r*  r   r(  Úclearr<  s   & r    rG  ÚLazyDict._format_allt  s:   € Ø×&Ô&ˆCØ!Ÿ[™[¨Ó-ˆD�I‰I�c‹Nñ 'à×Ñ×!Ñ!Ö#r"   )r(  r#  r*  rX   r]   )rp   rq   rr   rs   rt   r¤   r.  r4  r8  r=  rA  rD  rI  rQ  rT  rW  r^  rÄ   Úclassmethodr'  r   rG  ru   rv   rw   s   @r    r!  r!    sv   ø‡ € Ùo÷4ð 4òòò÷
ð ò
ò òòòò	òòð
 ó"ó ð"ò"÷$ð $r"   r!  c                   ó&   a € ] tR tRt o R tRtV tR# )ÚLazyRowiz  c                óz   € V P                   P                  V P                  P                  V.4      4      ^ ,          # rQ   ©r#  Úformat_columnrX   r?   r<  s   &&r    r   ÚLazyRow.format{  s-   € Ø�~‰~×+Ñ+¨D¯M©M×,@Ñ,@À#ÀÓ,GÓHÈÕKÐKr"   ro   N©rp   rq   rr   rs   r   ru   rv   rw   s   @r    rm  rm  z  s   ø‡ € ÷Lð Lr"   rm  c                   ó&   a € ] tR tRt o R tRtV tR# )Ú	LazyBatchi  c                ól   € V P                   P                  V P                  P                  V.4      4      # r]   ro  r<  s   &&r    r   ÚLazyBatch.format€  s(   € Ø�~‰~×+Ñ+¨D¯M©M×,@Ñ,@À#ÀÓ,GÓHÐHr"   ro   Nrr  rw   s   @r    rt  rt    s   ø‡ € ÷Ið Ir"   rt  c                   ó’   a € ] tR tRt o Rt]t]t]	t
]tRV 3R lR lltV 3R lR ltV 3R lR	 ltV 3R
 lR ltV 3R lR ltRtV tR# )r$  i„  z‡
A formatter is an object that extracts and formats data from pyarrow tables.
It defines the formatting for rows, columns and batches.
Nc          
      ót   <€ V ^8„  d   QhRS[ S[,          RS[ S[S[S[S[S[R3,          3,          ,          /# rë   rî   )r   rZ   s   "€r    r!   ÚFormatter.__annotate__�  sB   ø€ ÷ Lñ Lá™8Õ$ðLñ $¡D©©e±C¹¸t°OÕ.DÐ)DÕ$EÕFñLr"   c                óœ   € Wn         W n        \        V P                   V P                  4      V n        \	        V P                   4      V n        R # r]   )rì   rí   ré   Úpython_features_decoderr  Úpandas_features_decoderrò   s   &&&r    r¤   ÚFormatter.__init__�  s9   € ð
 !ŒØ!2ÔÜ'<¸T¿]¹]ÈD×LbÑLbÓ'cˆÔ$Ü'<¸T¿]¹]Ó'KˆÖ$r"   c          	      óZ   <€ V ^8„  d   QhRS[ P                  RS[RS[S[S[S[3,          /# )r   rX   Ú
query_typer   )r7   r   r6   r   r   r   r   )r   rZ   s   "€r    r!   ry  ™  s4   ø€ ÷ /ñ /¡§¡ð /±sð /¹uÁYÑP\Ñ^iÐEiÕ?jñ /r"   c                ó–   € VR 8X  d   V P                  V4      # VR8X  d   V P                  V4      # VR8X  d   V P                  V4      # R# ©rÑ   r<   r  N)Ú
format_rowrp  Úformat_batch)ra   rX   r  s   &&&r    Ú__call__ÚFormatter.__call__™  sP   € Ø˜ÔØ—?‘? 8Ó,Ð,Ø˜8Ô#Ø×%Ñ% hÓ/Ð/Ø˜7Ô"Ø×$Ñ$ XÓ.Ð.ñ #r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   rY   )r   rZ   s   "€r    r!   ry  ¡  s   ø€ ÷ "ñ "¡2§8¡8ð "±	ñ "r"   c                ó   € \         hr]   r^   r`   s   &&r    r‚  ÚFormatter.format_row¡  rd   r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   rf   )r   rZ   s   "€r    r!   ry  ¤  s   ø€ ÷ "ñ "¡b§h¡hð "±<ñ "r"   c                ó   € \         hr]   r^   r`   s   &&r    rp  ÚFormatter.format_column¤  rd   r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   rk   )r   rZ   s   "€r    r!   ry  §  s   ø€ ÷ "ñ "¡R§X¡Xð "±+ñ "r"   c                ó   € \         hr]   r^   r`   s   &&r    rƒ  ÚFormatter.format_batch§  rd   r"   )rì   r|  r{  rí   ©NN)rp   rq   rr   rs   rt   r�   Úsimple_arrow_extractorr‘   Úpython_arrow_extractorr    Únumpy_arrow_extractorrÔ   Úpandas_arrow_extractorr¤   r„  r‚  rp  rƒ  ru   rv   rw   s   @r    r$  r$  „  sX   ø‡ € ñð
 2ÐØ1ÐØ/ÐØ1Ð÷Lò L÷/ð /÷"ð "÷"ð "÷"ö "r"   r$  c                   ó2   a € ] tR tRt o V 3R lR ltRtV tR# )ÚTensorFormatteri«  c                ó    <€ V ^8„  d   QhRS[ /# )r   Údata_structrö   )r   rZ   s   "€r    r!   ÚTensorFormatter.__annotate__¬  s   ø€ ÷ "ñ "©tñ "r"   c                ó   € \         hr]   r^   )ra   r—  s   &&r    Úrecursive_tensorizeÚ#TensorFormatter.recursive_tensorize¬  rd   r"   ro   N)rp   rq   rr   rs   rš  ru   rv   rw   s   @r    r•  r•  «  s   ø‡ € ÷"ö "r"   r•  c                   ó,   a € ] tR tRt o V 3R ltRtV tR# )ÚTableFormatteri°  c                ó2   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   # )r   Ú
table_typeÚcolumn_type)r6   )r   rZ   s   "€r    r!   ÚTableFormatter.__annotate__°  s   ø‡ ‚ Ù�Oñ áÑò r"   ro   N)rp   rq   rr   rs   Ú__annotate_func__ru   rv   rw   s   @r    r�  r�  °  s   ø‡ ‡ „ r"   r�  c                   ó^   a € ] tR tRt o RtRtV 3R lR ltV 3R lR ltV 3R lR	 ltR
t	V t
R# )ÚArrowFormatteriµ  zarrow tablezarrow arrayc                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rW   rƒ   )r   rZ   s   "€r    r!   ÚArrowFormatter.__annotate__¹  s'   ø€ ÷ Cñ C¡2§8¡8ð C±·±ñ Cr"   c                ó@   € V P                  4       P                  V4      # r]   )r�  rb   r`   s   &&r    r‚  ÚArrowFormatter.format_row¹  s   € Ø×*Ñ*Ó,×8Ñ8¸ÓBÐBr"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rW   r‰   )r   rZ   s   "€r    r!   r¦  ¼  s'   ø€ ÷ Fñ F¡b§h¡hð F±2·8±8ñ Fr"   c                ó@   € V P                  4       P                  V4      # r]   )r�  rh   r`   s   &&r    rp  ÚArrowFormatter.format_column¼  s   € Ø×*Ñ*Ó,×;Ñ;¸HÓEÐEr"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[ P                  /# rW   rƒ   )r   rZ   s   "€r    r!   r¦  ¿  s'   ø€ ÷ Eñ E¡R§X¡Xð E±"·(±(ñ Er"   c                ó@   € V P                  4       P                  V4      # r]   )r�  rm   r`   s   &&r    rƒ  ÚArrowFormatter.format_batch¿  s   € Ø×*Ñ*Ó,×:Ñ:¸8ÓDÐDr"   ro   N©rp   rq   rr   rs   rŸ  r   r‚  rp  rƒ  ru   rv   rw   s   @r    r¤  r¤  µ  s3   ø‡ € Ø€JØ€K÷Cð C÷Fð F÷Eö Er"   r¤  c                   ól   a a€ ] tR tRt oR
V 3R lltV3R lR ltV3R lR ltV3R lR ltR	tVt	V ;t
# )ÚPythonFormatteriÃ  c                ó2   <€ \         SV `  W4       W n        R # r]   )Úsuperr¤   Úlazy)ra   rì   r´  rí   rZ  s   &&&&€r    r¤   ÚPythonFormatter.__init__Ä  s   ø€ Ü‰Ñ˜Ô5ØŽ	r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   ©r7   r   r   )r   rZ   s   "€r    r!   ÚPythonFormatter.__annotate__È  s   ø€ ÷ ñ ¡2§8¡8ð ±ñ r"   c                ó´   € V P                   '       d   \        W4      # V P                  4       P                  V4      pV P                  P                  V4      pV# r]   )r´  rm  r‘  rb   r{  rú   ©ra   rX   rÑ   s   && r    r‚  ÚPythonFormatter.format_rowÈ  sJ   € Ø�9�9ˆ9Ü˜8Ó*Ð*Ø×)Ñ)Ó+×7Ñ7¸ÓAˆØ×*Ñ*×5Ñ5°cÓ:ˆØˆ
r"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   r™   )r   rZ   s   "€r    r!   r¸  Ï  s   ø€ ÷ ñ ¡b§h¡hð ±4ñ r"   c                óœ   € V P                  4       P                  V4      pV P                  P                  W!P                  ^ ,          4      pV# rQ   )r‘  rh   r{  r   rF   ©ra   rX   r<   s   && r    rp  ÚPythonFormatter.format_columnÏ  óB   € Ø×,Ñ,Ó.×=Ñ=¸hÓGˆØ×-Ñ-×;Ñ;¸F×DYÑDYÐZ[ÕD\Ó]ˆØˆr"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   r·  )r   rZ   s   "€r    r!   r¸  Ô  s   ø€ ÷ ñ ¡R§X¡Xð ±'ñ r"   c                ó´   € V P                   '       d   \        W4      # V P                  4       P                  V4      pV P                  P                  V4      pV# r]   )r´  rt  r‘  rm   r{  r  ©ra   rX   r  s   && r    rƒ  ÚPythonFormatter.format_batchÔ  sJ   € Ø�9�9ˆ9Ü˜XÓ,Ð,Ø×+Ñ+Ó-×;Ñ;¸HÓEˆØ×,Ñ,×9Ñ9¸%Ó@ˆØˆr"   )r´  )NFN)rp   rq   rr   rs   r¤   r‚  rp  rƒ  ru   rv   Ú__classcell__©rZ  rZ   s   @@r    r±  r±  Ã  s-   ù‡ € ÷÷ð ÷ð ÷
÷ ð r"   r±  c                   ó^   a € ] tR tRt o RtRtV 3R lR ltV 3R lR ltV 3R lR	 ltR
t	V t
R# )ÚPandasFormatteriÜ  zpandas dataframezpandas seriesc                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rW   rÖ   )r   rZ   s   "€r    r!   ÚPandasFormatter.__annotate__à  s#   ø€ ÷ ñ ¡2§8¡8ð ±·±ñ r"   c                óz   € V P                  4       P                  V4      pV P                  P                  V4      pV# r]   )r“  rb   r|  rú   rº  s   && r    r‚  ÚPandasFormatter.format_rowà  s6   € Ø×)Ñ)Ó+×7Ñ7¸ÓAˆØ×*Ñ*×5Ñ5°cÓ:ˆØˆ
r"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rW   rá   )r   rZ   s   "€r    r!   rÊ  å  s#   ø€ ÷ ñ ¡b§h¡hð ±2·9±9ñ r"   c                óœ   € V P                  4       P                  V4      pV P                  P                  W!P                  ^ ,          4      pV# rQ   )r“  rh   r|  r   rF   r¾  s   && r    rp  ÚPandasFormatter.format_columnå  rÀ  r"   c                óN   <€ V ^8„  d   QhRS[ P                  RS[P                  /# rW   rÖ   )r   rZ   s   "€r    r!   rÊ  ê  s#   ø€ ÷ ñ ¡R§X¡Xð ±"·,±,ñ r"   c                óz   € V P                  4       P                  V4      pV P                  P                  V4      pV# r]   )r“  rm   r|  r  rº  s   && r    rƒ  ÚPandasFormatter.format_batchê  s6   € Ø×)Ñ)Ó+×9Ñ9¸(ÓCˆØ×*Ñ*×7Ñ7¸Ó<ˆØˆ
r"   ro   Nr¯  rw   s   @r    rÈ  rÈ  Ü  s-   ø‡ € Ø#€JØ!€K÷ð ÷
ð ÷
ö r"   rÈ  c                   ó|   a a€ ] tR tRt oRtRV3R lV 3R llltV3R lR ltV3R lR ltV3R	 lR
 ltRt	Vt
V ;t# )ÚCustomFormatterið  a‡  
A user-defined custom formatter function defined by a ``transform``.
The transform must take as input a batch of data extracted for an arrow table using the python extractor,
and return a batch.
If the output batch is not a dict, then output_all_columns won't work.
If the output batch has several fields, then querying a single column won't work since we don't know which field
to return.
c                ó8   <€ V ^8„  d   QhRS[ S[.S[3,          /# )r   r  )r   rz   )r   rZ   s   "€r    r!   ÚCustomFormatter.__annotate__ú  s   ø€ ÷ #ñ #¡(©D¨6±4¨<Õ"8ñ #r"   c                ó4   <€ \         SV `  W#R 7       Wn        R# )rñ   N)r³  r¤   r  )ra   r  rì   rí   ÚkwargsrZ  s   &&&&,€r    r¤   ÚCustomFormatter.__init__ú  s   ø€ Ü‰Ñ (ÐÔPØ"Žr"   c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   r“   )r   rZ   s   "€r    r!   rÖ  þ  s   ø€ ÷ ñ ¡2§8¡8ð ±ñ r"   c                ó€   € V P                  V4      p \        V4      #   \         d   p\        R T 24      ThRp?ii ; i)z]Custom formatting function must return a dict of sequences to be able to pick a row, but got N)rƒ  r   Ú	Exceptionr,   ©ra   rX   Úformatted_batchÚexcs   &&  r    r‚  ÚCustomFormatter.format_rowþ  sU   € Ø×+Ñ+¨HÓ5ˆð	Ü˜?Ó+Ð+øÜô 	ÜØoÐpð  pAð  Bóàðûð	ús   “
 ž=©8¸=c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   rf   )r   rZ   s   "€r    r!   rÖ    s   ø€ ÷ ñ ¡b§h¡hð ±<ñ r"   c                óf  € V P                  V4      p\        VR 4      '       dF   \        VP                  4       4      ^8”  d'   \	        R\        VP                  4       4       R24      hM\	        RV 24      h W!P                  ^ ,          ,          #   \         d   p\	        RT 24      ThRp?ii ; i)r  z‚Tried to query a column but the custom formatting function returns too many columns. Only one column was expected but got columns Ú.zPCustom formatting function must return a dict to be able to pick a row, but got N)rƒ  ÚhasattrrJ   r  r,   r{   rF   rÜ  rÝ  s   &&  r    rp  ÚCustomFormatter.format_column  sÊ   € Ø×+Ñ+¨HÓ5ˆÜ�? F×+Ò+Ü�?×'Ñ'Ó)Ó*¨QÔ.ÜðDÜDHÈ×I]ÑI]ÓI_ÓD`ÐCaÐabðdóð ð /ô ØbÐcrÐbsÐtóð ð	Ø"×#8Ñ#8¸Õ#;Õ<Ð<øÜô 	ÜØbÐcrÐbsÐtóàðûð	ús   Á8B ÂB0ÂB+Â+B0c                ó:   <€ V ^8„  d   QhRS[ P                  RS[/# rW   r“   )r   rZ   s   "€r    r!   rÖ    s   ø€ ÷ %ñ %¡R§X¡Xð %±$ñ %r"   c                ó˜   € V P                  4       P                  V4      pV P                  P                  V4      pV P	                  V4      # r]   )r‘  rm   r{  r  r  rÃ  s   && r    rƒ  ÚCustomFormatter.format_batch  s@   € Ø×+Ñ+Ó-×;Ñ;¸HÓEˆØ×,Ñ,×9Ñ9¸%Ó@ˆØ�~‰~˜eÓ$Ð$r"   )r  r�  )rp   rq   rr   rs   rt   r¤   r‚  rp  rƒ  ru   rv   rÅ  rÆ  s   @@r    rÔ  rÔ  ð  s7   ù‡ € ñ÷#õ #÷ð ÷ð ÷&%÷ %ð %r"   rÔ  c                óJ   € V ^8„  d   QhR\         R\        \         ,          RR/# )r   r   Úcolumnsr   N)r6   r{   )r   s   "r    r!   r!      s*   € ÷ fñ f¤ð f¬t´C­yð f¸Tñ fr"   c                 ó4   € W9  d   \        R V  RV 24      hR# )zColumn z5 not in the dataset. Current columns in the dataset: N)ÚKeyError)r   rê  s   &&r    Ú_check_valid_column_keyrí     s(   € Ø
ÔÜ˜  Ð%ZÐ[bÐZcÐdÓeÐeñ r"   c                ój   € V ^8„  d   QhR\         \        \        \        \        3,          R\        RR/# )r   r   Úsizer   N)r   r4   r5   r   r   )r   s   "r    r!   r!   %  s0   € ÷ !ñ !¤¤c¬5´%¼Ð&AÕ Bð !Ì#ð !ÐRVñ !r"   c                 óN  € \        V \        4      '       d.   V ^ 8  d   W,           ^ 8  g   W8¼  d   \        RV  RV 24      hR# \        V \        4      '       d   R# \        V \        4      '       dA   \        V 4      ^ 8”  d/   \        \        V 4      VR7       \        \        V 4      VR7       R# R# \        V \        4      '       dS   \        V 4      ^ 8”  dA   \        \        \        V 4      4      VR7       \        \        \        V 4      4      VR7       R# R# \        V 4       R# )r   zInvalid key: z is out of bounds for size N)rï  )r9   r4   Ú
IndexErrorr5   r   rJ   Ú_check_valid_index_keyÚmaxÚminr   r.   )r   rï  s   &&r    rò  rò  %  sÔ   € Ü�#”s×ÒØ�!ŒG˜�
 Qœ¨C¬KÜ˜}¨S¨EÐ1LÈTÈFÐSÓTÐTÙÜ	�Cœ×	Ò	ÙÜ	�Cœ×	Ò	Üˆs‹8�aŒ<Ü"¤3 s£8°$Õ7Ü"¤3 s£8°$×7ñ ô 
�Cœ×	"Ò	"Üˆs‹8�aŒ<Ü"¤3¤s¨3£x£=°tÕ<Ü"¤3¤s¨3£x£=°t×<ñ ô 	˜CÖ r"   c                óp   € V ^8„  d   QhR\         \        \        \        \        \
        3,          R\        /# r   )r   r4   r5   r   r6   r   )r   s   "r    r!   r!   8  s*   € ÷ ñ œ5¤¤e¬U´C¼Ð!AÕBð Äsñ r"   c                 óÖ   € \        V \        P                  4      '       d   R # \        V \        4      '       d   R# \        V \        \
        \        34      '       d   R# \        V 4       R# r�  )r9   ÚnumbersÚIntegralr6   r5   r   r   r.   r(   s   &r    Úkey_to_query_typerù  8  sG   € Ü�#”w×'Ñ'×(Ò(ÙÜ	�Cœ×	Ò	ÙÜ	�Cœ%¤¬Ð1×	2Ò	2ÙÜ˜Ör"   c          	      ó²   € V ^8„  d   QhR\         R\        \        \        \        \
        \        3,          R\        \         ,          R\        P                   /# r0   )	r   r   r4   r5   r   r6   r   r
   r7   )r   s   "r    r!   r!   B  sH   € ÷ (ñ (Üð(ä	Œs”Eœ5¤#¤xÐ/Õ	0ð(ô ”e�_ð(ô ‡X�Xñ	(r"   c                ó¤  € \        V\        \        \        \        \
        34      '       g    \        P                  ! V4      p\        V\        4      '       d   \        WP                  4       M'Ve   VP                  MV P                  p\        W4       Vf   \        W4      pV# \        WVR7      pV#   \         d    \        T4        L‹i ; i)aõ  
Query a Table to extract the subtable that correspond to the given key.

Args:
    table (``datasets.table.Table``): The input Table to query from
    key (``Union[int, slice, range, str, Iterable]``): The key can be of different types:
        - an integer i: the subtable containing only the i-th row
        - a slice [i:j:k]: the subtable containing the rows that correspond to this slice
        - a range(i, j, k): the subtable containing the rows that correspond to this range
        - a string c: the subtable containing all the rows but only the column c
        - an iterable l: the subtable that is the concatenation of all the i-th rows for all i in the iterable
    indices (Optional ``datasets.table.Table``): If not None, it is used to re-map the given key to the table rows.
        The indices table must contain one column named "indices" of type uint64.
        This is used in case of shuffling or rows selection.


Returns:
    ``pyarrow.Table``: the result of the query on the input table
)r2   )r9   r4   r5   r   r6   r   ÚoperatorÚindexr,   r.   rí  rF   r;   rò  r>   rB   )r1   r   r2   rï  Úpa_subtables   &&&  r    Úquery_tablerÿ  B  s®   € ô2 �cœC¤¬¬s´HÐ=×>Ò>ð	%Ü—.’. Ó%ˆCô �#”s×ÒÜ ×%7Ñ%7Õ8à#*Ò#6ˆw×Ò¸E¿N¹NˆÜ˜sÔ)à‚Ü" 5Ó.ˆð Ðô 8¸ÈGÔTˆØÐøô ô 	%Ü Ö$ð	%ús   ­B6 Â6CÃCc          	      óž   € V ^8„  d   QhR\         R\        \        \        \        \
        \        3,          R\        R\        \        ,          /# )r   r1   r   r#  Úformat_columns)
r   r   r4   r5   r   r6   r   r$  r
   r{   )r   s   "r    r!   r!   m  sD   € ÷ 9 ñ 9 Üð9 ä	Œs”Eœ5¤#¤xÐ/Õ	0ð9 ô ð9 ô œT•Nñ	9 r"   c                ó"  a€ \        V \        4      '       d   V P                  pMT p\        V4      p\	        VP
                  R7      pSf
   V! WVR7      # VR8X  d   VS9   d	   V! WV4      # V! WVR7      # VP                  V3R lVP                   4       4      pV! W†R7      p	V'       df   \        V	\        4      '       dB   VP                  V3R lVP                   4       4      p
V! W¦R7      pV	P                  V4       V	# \        RV	 24      hV	# )a²  
Format a Table depending on the key that was used and a Formatter object.

Args:
    table (``datasets.table.Table``): The input Table to format
    key (``Union[int, slice, range, str, Iterable]``): Depending on the key that was used, the formatter formats
        the table as either a row, a column or a batch.
    formatter (``datasets.formatting.formatting.Formatter``): Any subclass of a Formatter such as
        PythonFormatter, NumpyFormatter, etc.
    format_columns (:obj:`List[str]`, optional): if not None, it defines the columns that will be formatted using the
        given formatter. Other columns are discarded (unless ``output_all_columns`` is True)
    output_all_columns (:obj:`bool`, defaults to False). If True, the formatted output is completed using the columns
        that are not in the ``format_columns`` list. For these columns, the PythonFormatter is used.


Returns:
    A row, column or batch formatted object defined by the Formatter:
    - the PythonFormatter returns a dictionary for a row or a batch, and a list for a column.
    - the NumpyFormatter returns a dictionary for a row or a batch, and a np.array for a column.
    - the PandasFormatter returns a pd.DataFrame for a row or a batch, and a pd.Series for a column.
    - the TorchFormatter returns a dictionary for a row or a batch, and a torch.Tensor for a column.
    - the TFFormatter returns a dictionary for a row or a batch, and a tf.Tensor for a column.
r  )r  r<   c              3   ó8   <"  € T F  qS9  g   K  Vx € K  	  R # 5ir]   ro   ©r¸   r±   r  s   & €r    rº   Úformat_table.<locals>.<genexpr>™  s   øé € Ð*mÑ:O°3Ð^lÑSl¯3ª3Ó:Oùó   ƒ�
c              3   ó8   <"  € T F  qS9   g   K  Vx € K  	  R # 5ir]   ro   r  s   & €r    rº   r  �  s   øé € ð @Ù#8˜CÀ>Ñ<Q—C’CÓ#8ùr  z\Custom formatting function must return a dict to work with output_all_columns=True, but got )r9   r   r1   rù  r±  rì   rE   rF   r   r]  r,   )r1   r   r#  r  Úoutput_all_columnsrX   r  Úpython_formatterÚpa_table_to_formatÚformatted_outputÚpa_table_with_remaining_columnsÚremaining_columns_dicts   &&&f&       r    Úformat_tabler  m  s!  ø€ ô< �%œ×ÒØ—;‘;‰àˆÜ" 3Ó'€JÜ&°	×0BÑ0BÔCÐØÒÙ˜Ô9Ð9Ø	�xÔ	Ø�.Ô Ù˜XÓ2Ð2á# HÔDÐDà%Ÿ]™]Ô*m¸(×:OÒ:OÓ*mÓmÐÙ$Ð%7ÔOÐßÜÐ*¬N×;Ò;Ø2:·-±-ô @Ø#+×#8Ò#8ó@ó 3Ð/ñ *:Ð:YÔ)qÐ&Ø ×'Ñ'Ð(>Ô?ð
  Ðô  Ørð  tDð  sEð  Fóð ð  Ðr"   r]   )NF)Fr÷  rü  Úcollections.abcr   r   r   Ú	functoolsr   Útypingr   r   r	   r
   r   r   ÚnumpyrG   Úpandasr×   Úpyarrowr7   rì   r   Úfeatures.featuresr   r   r   r   r1   r   Úutils.py_utilsr   r   r   r   r   r)   r.   rB   r>   rS   rU   r   rO   r�   rz   r{   r‘   r«   r    rØ   râ   rÔ   ré   r  r!  rm  rt  r$  r•  r�  r¤  r±  rÈ  rÔ  rí  rò  rù  rÿ  r  ro   r"   r    Ú<module>r     s?  ðó Û ß =Ñ =Ý ÷ D× Cã Û Û å ß uÓ uÝ Ý 3ñ ˆCƒL€á�KÓ €	Ù�~Ó&€Ù�mÓ$€õ3õõõ<õ2#ô"˜ ¨L¸+Ð!EÕFô "õ"=ô
Ð-¨b¯h©h¸¿¹À"Ç(Á(Ð.JÕKô ô$Ð-¨d°D¸$Ð.>Õ?ô $ô1/Ð,¨T°2·:±:¸tÐ-CÕDô 1/ôhDÐ-¨b¯l©l¸B¿I¹IÀrÇ|Á|Ð.SÕTô D÷wñ w÷*&ñ &ô@j$ˆ~ô j$ôZLˆhô Lô
I�ô Iô
$"�˜	 <°Ð<Õ=ô $"ôN"�i 	¨<¸Ð DÕEô "ô
�Y˜y¨,¸ÐCÕDô ô
E�^ B§H¡H¨b¯h©h¸¿¹Ð$@ÕAô Eô�i ¨¨wÐ 6Õ7ô ô2�n R§\¡\°2·9±9¸b¿l¹lÐ%JÕKô ô(-%�i  l°DÐ 8Õ9ô -%õ`fõ
!õ&÷(÷V9 ñ 9 r"   