Ë
    u™ãj;o  ã                  óD  — d Z ddlmZ ddlZddlZddlZddlmZmZm	Z	 ddl
Z
ddl
mZmZ ddlmZ ddlmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlm Z m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( erddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/ dd„Z0	 	 	 d	 	 	 	 	 	 	 	 	 	 	 dd„Z1 G d„ d«      Z2 G d„ de2«      Z3 G d„ de2«      Z4dejj                  dddddf	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d d„Z6 ed«      ejj                  ddejj                  dddf	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d!d„«       Z7y)"zparquet compaté    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚLiteral)Úcatch_warningsÚfilterwarnings)Ú_global_config)Úlib)Úimport_optional_dependency)ÚAbstractMethodErrorÚPandas4Warning)Ú
set_module)Úfind_stack_level)Úcheck_dtype_backend)Ú	DataFrame)Úarrow_table_to_pandasÚsuppress_pyarrow_values_warning)Ú	IOHandlesÚcheck_parent_directoryÚ
get_handleÚis_fsspec_urlÚis_urlÚstringify_path)ÚDtypeBackendÚFilePathÚParquetCompressionOptionsÚ
ReadBufferÚStorageOptionsÚWriteBufferÚBaseImplc                ót  — | dk(  rt         d   d   d   } | dk(  r,t        t        g}d}|D ]  }	  |«       c S  t        d|› �«      ‚| d	k(  r
t        «       S | d
k(  r.t        j                  dt        t        «       ¬«       t        «       S t        d«      ‚# t        $ r}|dt	        |«      z   z  }Y d}~Œˆd}~ww xY w)zreturn our implementationÚautoÚioÚparquetÚengineÚ z
 - NzÉUnable to find a usable engine; tried using: 'pyarrow', 'fastparquet'.
A suitable version of pyarrow or fastparquet is required for parquet support.
Trying to import the above resulted in these errors:ÚpyarrowÚfastparquetzfThe 'fastparquet' engine is deprecated and will be removed in a future version. Use 'pyarrow' instead.©Ú
stacklevelz.engine must be one of 'pyarrow', 'fastparquet')
ÚconfigÚPyArrowImplÚFastParquetImplÚImportErrorÚstrÚwarningsÚwarnr   r   Ú
ValueError)r%   Úengine_classesÚ
error_msgsÚengine_classÚerrs        ú\/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/pandas/io/parquet.pyÚ
get_enginer8   9   sá   € à�ÒÜ˜‘˜iÑ(¨Ñ2ˆà�Òä%¤Ð7ˆàˆ
Ø*ò 	1ˆLð1Ù#“~Ò%ð	1ô ðCð ˆlðó
ð 	
ð �ÒÜ‹}ÐØ	�=Ò	 Ü�‰ð5äÜ'Ó)õ		
ô Ó Ð ä
ÐEÓ
FÐFøô1 ò 1Ø˜g¬¨C«Ñ0Ñ0•
ûð1ús   ®BÂ	B7ÂB2Â2B7c                ó   — t        | «      }|�ƒt        dd¬«      }t        dd¬«      }|�#t        ||j                  «      r|rOt	        d«      ‚|�!t        ||j
                  j                  «      rn!t        dt        |«      j                  › �«      ‚t        |«      rn|€ld}|€5t        d«      }	t        d«      }	 |j                  j                  | «      \  }}|€N	 t        d«      } |j"                  j$                  |fi |xs i ¤Ž\  }}n|rt)        |«      r|d
k7  rt        d«      ‚d}|s¾|s¼t        |t        «      r¬t*        j,                  j/                  |«      s�t)        |«      rt1        ||d|¬«      }|j2                  }nft*        j,                  j5                  |«      }d|v sd|v sd|v r;t7        |«       t        d«      }	|	j9                  ||«      }t;        |ddi|g¬«      }|}|||fS # t        |	j                  f$ r Y �Œ/t        $ r(}
t        |«      j!                  d	«      s‚ |
}Y d}
~
�ŒZd}
~
ww xY w# t&        $ r}
|€‚ |
|‚d}
~
ww xY w)zFile handling for PyArrow.Nz
pyarrow.fsÚignore)ÚerrorsÚfsspecz8storage_options not supported with a pyarrow FileSystem.z9filesystem must be a pyarrow or fsspec FileSystem, not a r'   zhdfs:///Úrbz8storage_options passed with buffer, or non-supported URLF©Úis_textÚstorage_optionsÚwÚaÚxÚmethod)ÚhandleÚcompressionÚcreated_handles)r   r   Ú
isinstanceÚ
FileSystemÚNotImplementedErrorÚspecÚAbstractFileSystemr2   ÚtypeÚ__name__r   Úfrom_uriÚ	TypeErrorÚArrowExceptionÚOSErrorr/   Ú
startswithÚcoreÚ	url_to_fsÚ	Exceptionr   ÚosÚpathÚisdirr   rE   Ú
expanduserr   ÚOSFiler   )rX   Úfsr@   ÚmodeÚis_dirÚpath_or_handleÚpa_fsr<   Úpa_errorÚpar6   ÚhandlesÚstreams                r7   Ú_get_path_or_handlere   a   sv  € ô $ DÓ)€NØ	€~Ü*¨<ÀÔIˆÜ+¨H¸XÔFˆØÐ¤¨B°×0@Ñ0@Ô!AÙÜ)ØNóð ð Ð¤J¨r°6·;±;×3QÑ3QÔ$RØäðÜ˜b›×*Ñ*Ð+ð-óð ô �^Ô$¨¨ØˆØÐ"Ü+¨IÓ6ˆBÜ.¨|Ó<ˆEð	Ø%*×%5Ñ%5×%>Ñ%>¸tÓ%DÑ"��Nð ˆ:ð	(Ü3°HÓ=�Ø%: V§[¡[×%:Ñ%:Ø"ñ&Ø'6Ò'<¸"ñ&Ñ"�‘Nñ 
¤&¨Ô"8¸DÀDºLô ÐSÓTÐTà€GáÙÜ�~¤sÔ+Ü—‘—‘˜nÔ-ä�.Ô!ô !Ø ¨eÀ_ôˆGð %Ÿ^™^‰Nô  ŸW™W×/Ñ/°Ó?ˆNØ�d‰{˜c T™k¨S°D©[Ü& ~Ô6ô 0°	Ó:�ØŸ™ >°4Ó8�Ü#Ø!Ø!)¨4Ð 0Ø%+ Hô�ð
 "(�Ø˜7 BÐ&Ð&øôy ˜r×0Ñ0Ð1ò ÚÜò ô ˜>Ó*×5Ñ5°jÔAØØ–ûðûô ò (ØÐ#Øà˜xÐ'ûð	(ús6   Â9G. Ã/H9 Ç.H6ÈH6ÈH1È1H6È9	IÉIÉIc                  ó0   — e Zd Zedd„«       Zdd„Zddd„Zy)r    c                ó:   — t        | t        «      st        d«      ‚y )Nz+to_parquet only supports IO with DataFrames)rH   r   r2   )Údfs    r7   Úvalidate_dataframezBaseImpl.validate_dataframeÃ   s   € ä˜"œiÔ(ÜÐJÓKÐKð )ó    c                ó   — t        | «      ‚©N©r   )Úselfrh   rX   rF   Úkwargss        r7   ÚwritezBaseImpl.writeÈ   ó   € Ü! $Ó'Ð'rj   Nc                ó   — t        | «      ‚rl   rm   )rn   rX   Úcolumnsro   s       r7   ÚreadzBaseImpl.readË   rq   rj   )rh   r   ÚreturnÚNonerl   )ru   r   )rN   Ú
__module__Ú__qualname__Ústaticmethodri   rp   rt   © rj   r7   r    r    Â   s    „ ØòLó ðLó(õ(rj   c                  óz   — e Zd Zdd„Z	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zddej                  dddf	 	 	 	 	 	 	 dd„Zy)	r,   c                ó<   — t        dd¬«       dd l}dd l}|| _        y )Nr'   z(pyarrow is required for parquet support.©Úextrar   )r   Úpyarrow.parquetÚ(pandas.core.arrays.arrow.extension_typesÚapi)rn   r'   Úpandass      r7   Ú__init__zPyArrowImpl.__init__Ð   s!   € Ü"ØÐGõ	
ó 	ó 	8àˆ�rj   Nc                óÔ  — | j                  |«       d|j                  dd «      i}	|�||	d<   t        «       5   | j                  j                  j
                  |fi |	¤Ž}
d d d «       |j                  rNdt        j                  |j                  «      i}
j                  j                  }i |¥|¥}|
j                  |«      }
t        |||d|d u¬«      \  }}}	 |�- | j                  j                  j                  
|f|||dœ|¤Ž n+ | j                  j                  j                  
|f||dœ|¤Ž |�|j!                  «        y y # 1 sw Y   ŒèxY w# |�|j!                  «        w w xY w)NÚschemaÚpreserve_indexÚPANDAS_ATTRSÚwb)r@   r]   r^   )rF   Úpartition_colsÚ
filesystem)rF   rŠ   )ri   Úpopr   r�   ÚTableÚfrom_pandasÚattrsÚjsonÚdumpsr…   ÚmetadataÚreplace_schema_metadatare   r$   Úwrite_to_datasetÚwrite_tableÚclose)rn   rh   rX   rF   Úindexr@   r‰   rŠ   ro   Úfrom_pandas_kwargsÚtableÚdf_metadataÚexisting_metadataÚmerged_metadatar_   rc   s                   r7   rp   zPyArrowImpl.writeÛ   s›  € ð 	×Ñ Ô#à.6¸¿
¹
À8ÈTÓ8RÐ-SÐØÐØ38ÐÐ/Ñ0ä,Ó.ñ 	IØ.�D—H‘H—N‘N×.Ñ.¨rÑHÐ5GÑHˆE÷	Ið �8Š8Ø)¬4¯:©:°b·h±hÓ+?Ð@ˆKØ %§¡× 5Ñ 5ÐØBÐ!2ÐB°kÐBˆOØ×1Ñ1°/ÓBˆEä.AØØØ+ØØ!¨Ð-ô/
Ñ+ˆ˜ ð	 ØÐ)à1�—‘× Ñ ×1Ñ1ØØ"ðð !,Ø#1Ø)ñð óð -�—‘× Ñ ×,Ñ,ØØ"ðð !,Ø)ñ	ð
 òð Ð"Ø—‘•ð #÷K	Ið 	IûðJ Ð"Ø—‘•ð #ús   ·(EÃAE ÅEÅE'c                ó*  — d|d<   t        |||d¬«      \  }	}
}	  | j                  j                  j                  |	f|||dœ|¤Ž}d }|j                  j
                  r1d|j                  j
                  v r|j                  j
                  d   }t        «       5  t        ddt        «       t        |||¬	«      }d d d «       |�t        j                  |«      _        |
�|
j                  «        S S # 1 sw Y   Œ:xY w# |
�|
j                  «        w w xY w)
NTÚuse_pandas_metadatar=   )r@   r]   )rs   rŠ   Úfilterss   PANDAS_ATTRSr:   úmake_block is deprecated)Údtype_backendÚto_pandas_kwargs)re   r�   r$   Ú
read_tabler…   r‘   r   r   r   r   r�   ÚloadsrŽ   r•   )rn   rX   rs   rž   r    r@   rŠ   r¡   ro   r_   rc   Úpa_tabler™   Úresults                 r7   rt   zPyArrowImpl.read  s)  € ð )-ˆÐ$Ñ%ä.AØØØ+Øô	/
Ñ+ˆ˜ ð	 Ø2�t—x‘x×'Ñ'×2Ñ2ØðàØ%Øñ	ð
 ñˆHð ˆKØ�‰×'Ò'Ø" h§o¡o×&>Ñ&>Ñ>Ø"*§/¡/×":Ñ":¸?Ñ"K�KäÓ!ñ 
ÜØØ.Ü"ôô
 /ØØ"/Ø%5ô�÷
ð Ð&Ü#Ÿz™z¨+Ó6�”ØàÐ"Ø—‘•ð #÷!
ð 
ûð  Ð"Ø—‘•ð #ús$   šA>C= Â C1Â8%C= Ã1C:Ã6C= Ã=D©ru   rv   ©ÚsnappyNNNN)rh   r   rX   zFilePath | WriteBuffer[bytes]rF   r   r–   úbool | Noner@   úStorageOptions | Noner‰   úlist[str] | Noneru   rv   )r    úDtypeBackend | lib.NoDefaultr@   rª   r¡   údict[str, Any] | Noneru   r   )rN   rw   rx   rƒ   rp   r
   Ú
no_defaultrt   rz   rj   r7   r,   r,   Ï   s§   „ ó	ð 2:Ø!Ø15Ø+/Øð7 àð7 ð ,ð7 ð /ð	7 ð
 ð7 ð /ð7 ð )ð7 ð 
ó7 ðx ØØ69·n±nØ15ØØ26ð2 ð
 4ð2 ð /ð2 ð 0ð2 ð 
ô2 rj   r,   c                  óT   — e Zd Zdd„Z	 	 	 	 	 d	 	 	 	 	 	 	 dd„Z	 	 	 	 	 d	 	 	 	 	 d	d„Zy)
r-   c                ó,   — t        dd¬«      }|| _        y )Nr(   z,fastparquet is required for parquet support.r}   )r   r�   )rn   r(   s     r7   rƒ   zFastParquetImpl.__init__J  s   € ô 1ØÐ!Oô
ˆð ˆ�rj   Nc                ó”  ‡‡	— | j                  |«       d|v r|�t        d«      ‚d|v r|j                  d«      }|�d|d<   |�t        d«      ‚t	        |«      }t        |«      rt        d«      Š	ˆ	ˆfd„|d<   n‰rt        d	«      ‚t        d
¬«      5   | j                  j                  ||f|||dœ|¤Ž d d d «       y # 1 sw Y   y xY w)NÚpartition_onzYCannot use both partition_on and partition_cols. Use partition_cols for partitioning dataÚhiveÚfile_schemeú9filesystem is not implemented for the fastparquet engine.r<   c                óP   •—  ‰j                   | dfi ‰xs i ¤Žj                  «       S )Nrˆ   )Úopen)rX   Ú_r<   r@   s     €€r7   ú<lambda>z'FastParquetImpl.write.<locals>.<lambda>u  s.   ø€ °+°&·+±+Ø�dñ3Ø.Ò4°"ñ3ç‰d‹fð rj   Ú	open_withz?storage_options passed with file object or non-fsspec file pathT)Úrecord)rF   Úwrite_indexr²   )
ri   r2   r‹   rJ   r   r   r   r   r�   rp   )
rn   rh   rX   rF   r–   r‰   r@   rŠ   ro   r<   s
         `  @r7   rp   zFastParquetImpl.writeR  s  ù€ ð 	×Ñ Ô#à˜VÑ#¨Ð(BÜðKóð ð ˜VÑ#Ø#ŸZ™Z¨Ó7ˆNàÐ%Ø$*ˆF�=Ñ!àÐ!Ü%ØKóð ô
 ˜dÓ#ˆÜ˜ÔÜ/°Ó9ˆFô#ˆF�;Òñ ÜØQóð ô  4Ô(ñ 	ØˆD�H‰H�N‰NØØðð (Ø!Ø+ñð ò÷	÷ 	ñ 	ús   Â#B>Â>Cc                ó,  — i }|j                  dt        j                  «      }	d|d<   |	t        j                  urt        d«      ‚|�t	        d«      ‚|�t	        d«      ‚t        |«      }d }
t        |«      r1t        d«      } |j                  |dfi |xs i ¤Žj                  |d	<   nJt        |t        «      r:t        j                  j                  |«      st        |dd|¬
«      }
|
j                   }	  | j"                  j$                  |fi |¤Ž}t'        «       5  t)        ddt*        «        |j,                  d||dœ|¤Žcd d d «       |
�|
j/                  «        S S # 1 sw Y   nxY w	 |
�|
j/                  «        y y # |
�|
j/                  «        w w xY w)Nr    FÚpandas_nullszHThe 'dtype_backend' argument is not supported for the fastparquet enginerµ   z?to_pandas_kwargs is not implemented for the fastparquet engine.r<   r=   r\   r>   r:   rŸ   )rs   rž   rz   )r‹   r
   r®   r2   rJ   r   r   r   r·   r\   rH   r/   rW   rX   rY   r   rE   r�   ÚParquetFiler   r   r   Ú	to_pandasr•   )rn   rX   rs   rž   r@   rŠ   r¡   ro   Úparquet_kwargsr    rc   r<   Úparquet_files                r7   rt   zFastParquetImpl.read‡  s´  € ð *,ˆØŸ
™
 ?´C·N±NÓCˆà).ˆ�~Ñ&Ø¤§¡Ñ.Üð%óð ð Ð!Ü%ØKóð ð Ð'Ü%ØQóð ô ˜dÓ#ˆØˆÜ˜ÔÜ/°Ó9ˆFà#. 6§;¡;¨t°TÑ#U¸oÒ>SÐQSÑ#U×#XÑ#XˆN˜4Ò Ü˜œcÔ"¬2¯7©7¯=©=¸Ô+>ô !Ø�d E¸?ôˆGð —>‘>ˆDð	 Ø/˜4Ÿ8™8×/Ñ/°ÑG¸ÑGˆLÜÓ!ñ ÜØØ.Ü"ôð
 .�|×-Ñ-ð Ø#¨WñØ8>ñ÷ð ð Ð"Ø—‘•ð #÷ð úð ð Ð"Ø—‘•ð #øˆwÐ"Ø—‘•ð #ús$   Ã3'E> Ä&EÅ 	E> ÅE&Å"E> Å>Fr¦   r§   )rh   r   rF   z*Literal['snappy', 'gzip', 'brotli'] | Noner@   rª   ru   rv   )NNNNN)r@   rª   r¡   r­   ru   r   )rN   rw   rx   rƒ   rp   rt   rz   rj   r7   r-   r-   I  s{   „ óð CKØØØ15Øð3àð3ð @ð	3ð /ð3ð 
ó3ðp ØØ15ØØ26ð7 ð
 /ð7 ð 0ð7 ð 
ô7 rj   r-   r¨   c           	     óž  — t        |t        «      r|g}|t        j                  ur)|dk(  r$t	        j
                  dt        t        «       ¬«       |t        j                  u rd}t        |«      }	|€t        j                  «       n|}
 |	j                  | |
f|||||dœ|¤Ž |€,t        |
t        j                  «      sJ ‚|
j                  «       S y)a‚  
    Write a DataFrame to the parquet format.

    Parameters
    ----------
    df : DataFrame
    path : str, path object, file-like object, or None, default None
        String, path object (implementing ``os.PathLike[str]``), or file-like
        object implementing a binary ``write()`` function. If None, the result
        is returned as bytes. If a string, it will be used as the root directory
        path when writing a partitioned dataset. The engine fastparquet does
        not accept file-like objects.

        The string could be a URL. Valid URL schemes include http, ftp, s3,
        gs, and file. For file URLs, a host is expected. A local file could be:
        ``file://localhost/path/to/table.parquet``. A remote example could be:
        ``s3://bucket/path/to/table.parquet``.

        Certain URL schemes may require additional packages. For example, S3
        URLs require the ``s3fs`` library. See
        :ref:`install.optional_dependencies` for a full list.
    engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
        Parquet library to use. If 'auto', then the option
        ``io.parquet.engine`` is used. The default ``io.parquet.engine``
        behavior is to try 'pyarrow', falling back to 'fastparquet' if
        'pyarrow' is unavailable.

        When using the ``'pyarrow'`` engine and no storage options are provided
        and a filesystem is implemented by both ``pyarrow.fs`` and ``fsspec``
        (e.g. "s3://"), then the ``pyarrow.fs`` filesystem is attempted first.
        Use the filesystem keyword with an instantiated fsspec filesystem
        if you wish to use its implementation.

        .. deprecated:: 3.1.0
            The ``'fastparquet'`` and ``'auto'`` engine options are
            deprecated. Use ``'pyarrow'`` or do not pass ``engine``
            to use the default.

    compression : {'snappy', 'gzip', 'brotli', 'lz4', 'zstd', None},
        default 'snappy'. Name of the compression to use. Use ``None``
        for no compression.
    index : bool, default None
        If ``True``, include the dataframe's index(es) in the file output. If
        ``False``, they will not be written to the file.
        If ``None``, similar to ``True`` the dataframe's index(es)
        will be saved. However, instead of being saved as values,
        the RangeIndex will be stored as a range in the metadata so it
        doesn't require much space and is faster. Other indexes will
        be included as columns in the file output.
    partition_cols : str or list, optional, default None
        Column names by which to partition the dataset.
        Columns are partitioned in the order they are given.
        Must be None if path is not a string.
    storage_options : dict, optional
        Extra options that make sense for a particular storage connection, e.g.
        host, port, username, password, etc. For HTTP(S) URLs the key-value
        pairs are forwarded to ``urllib.request.Request`` as header options.
        For other URLs (e.g. starting with "s3://", and "gcs://") the
        key-value pairs are forwarded to ``fsspec.open``. Please see ``fsspec``
        and ``urllib`` for more details, and for more examples on storage
        options refer `here <https://pandas.pydata.org/docs/user_guide/io.html?
        highlight=storage_options#reading-writing-remote-files>`_.
    filesystem : fsspec or pyarrow filesystem, default None
        Filesystem object to use when reading the parquet file. Only implemented
        for ``engine="pyarrow"``.

        .. versionadded:: 2.1.0

    **kwargs
        Additional keyword arguments passed to the engine:

        * For ``engine="pyarrow"``: passed to :func:`pyarrow.parquet.write_table`
          or :func:`pyarrow.parquet.write_to_dataset` (when using partition_cols)
        * For ``engine="fastparquet"``: passed to :func:`fastparquet.write`

    Returns
    -------
    bytes if no path argument is provided else None
    r"   ú†engine='auto' is deprecated and will be removed in a future version. Pass engine='pyarrow' or do not pass 'engine' to use the default.r)   N)rF   r–   r‰   r@   rŠ   )rH   r/   r
   r®   r0   r1   r   r   r8   r#   ÚBytesIOrp   Úgetvalue)rh   rX   r%   rF   r–   r@   r‰   rŠ   ro   ÚimplÚpath_or_bufs              r7   Ú
to_parquetrÉ   Á  sÖ   € ôt �.¤#Ô&Ø(Ð)ˆØ”S—^‘^Ñ#¨°&Ò(8Ü�‰ð+ô Ü'Ó)õ	
ð ”—‘ÑØˆÜ�fÓ€DàAEÀ´·±´ÐSW€Kà€D‡J�JØ
Øð	ð  ØØ%Ø'Øñ	ð ò	ð €|Ü˜+¤r§z¡zÔ2Ð2Ð2Ø×#Ñ#Ó%Ð%àrj   r‚   c           
     ó   — |t         j                  ur)|dk(  r$t        j                  dt        t        «       ¬«       |t         j                  u rd}t        |«      }	t        |«        |	j                  | f||||||dœ|¤ŽS )a)  
    Load a parquet object from the file path, returning a DataFrame.

    This function requires the `pyarrow <https://arrow.apache.org/docs/python/>`_
    library.

    The function automatically handles reading the data from a parquet file
    and creates a DataFrame with the appropriate structure.

    Parameters
    ----------
    path : str, path object or file-like object
        String, path object (implementing ``os.PathLike[str]``), or file-like
        object implementing a binary ``read()`` function.
        The string could be a URL. Valid URL schemes include http, ftp, s3,
        gs, and file. For file URLs, a host is expected. A local file could be:
        ``file://localhost/path/to/table.parquet``.

        Certain URL schemes may require additional packages. For example, S3
        URLs require the ``s3fs`` library. See
        :ref:`install.optional_dependencies` for a full list.

        A file URL can also be a path to a directory that contains multiple
        partitioned parquet files. Both pyarrow and fastparquet support
        paths to directories as well as file URLs. A directory path could be:
        ``file://localhost/path/to/tables`` or ``s3://bucket/partition_dir``.
    engine : {'auto', 'pyarrow', 'fastparquet'}, default 'auto'
        Parquet library to use. If 'auto', then the option
        ``io.parquet.engine`` is used. The default ``io.parquet.engine``
        behavior is to try 'pyarrow', falling back to 'fastparquet' if
        'pyarrow' is unavailable.

        When using the ``'pyarrow'`` engine and no storage options are provided
        and a filesystem is implemented by both ``pyarrow.fs`` and ``fsspec``
        (e.g. "s3://"), then the ``pyarrow.fs`` filesystem is attempted first.
        Use the filesystem keyword with an instantiated fsspec filesystem
        if you wish to use its implementation.

        .. deprecated:: 3.1.0
            The ``'fastparquet'`` and ``'auto'`` engine options are
            deprecated. Use ``'pyarrow'`` or do not pass ``engine``
            to use the default.

    columns : list, default=None
        If not None, only these columns will be read from the file.
    storage_options : dict, optional
        Extra options that make sense for a particular storage connection, e.g.
        host, port, username, password, etc. For HTTP(S) URLs the key-value
        pairs are forwarded to ``urllib.request.Request`` as header options.
        For other URLs (e.g. starting with "s3://", and "gcs://") the
        key-value pairs are forwarded to ``fsspec.open``. Please see ``fsspec``
        and ``urllib`` for more details, and for more examples on storage
        options refer `here <https://pandas.pydata.org/docs/user_guide/io.html?
        highlight=storage_options#reading-writing-remote-files>`_.
    dtype_backend : {'numpy_nullable', 'pyarrow'}
        Back-end data type applied to the resultant :class:`DataFrame`
        (still experimental). If not specified, the default behavior
        is to not use nullable data types. If specified, the behavior
        is as follows:

        * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
        * ``"pyarrow"``: returns pyarrow-backed nullable
          :class:`ArrowDtype` :class:`DataFrame`

        .. versionadded:: 2.0

    filesystem : fsspec or pyarrow filesystem, default None
        Filesystem object to use when reading the parquet file. Only implemented
        for ``engine="pyarrow"``.

        .. versionadded:: 2.1.0

    filters : List[Tuple] or List[List[Tuple]], default None
        To filter out data.
        Filter syntax: [[(column, op, val), ...],...]
        where op is [==, =, >, >=, <, <=, !=, in, not in]
        The innermost tuples are transposed into a set of filters applied
        through an `AND` operation.
        The outer list combines these sets of filters through an `OR`
        operation.
        A single list of tuples can also be used, meaning that no `OR`
        operation between set of filters is to be conducted.

        Using this argument will NOT result in row-wise filtering of the final
        partitions unless ``engine="pyarrow"`` is also specified.  For
        other engines, filtering is only performed at the partition level, that is,
        to prevent the loading of some row-groups and/or files.

        .. versionadded:: 2.1.0

    to_pandas_kwargs : dict | None, default None
        Keyword arguments to pass through to :func:`pyarrow.Table.to_pandas`
        when ``engine="pyarrow"``.

        .. versionadded:: 3.0.0

    **kwargs
        Additional keyword arguments passed to the engine:

        * For ``engine="pyarrow"``: passed to :func:`pyarrow.parquet.read_table`
        * For ``engine="fastparquet"``: passed to
          :meth:`fastparquet.ParquetFile.to_pandas`

    Returns
    -------
    DataFrame
        DataFrame based on parquet file.

    See Also
    --------
    DataFrame.to_parquet : Create a parquet object that serializes a DataFrame.

    Examples
    --------
    >>> original_df = pd.DataFrame({"foo": range(5), "bar": range(5, 10)})
    >>> original_df
       foo  bar
    0    0    5
    1    1    6
    2    2    7
    3    3    8
    4    4    9
    >>> df_parquet_bytes = original_df.to_parquet()
    >>> from io import BytesIO
    >>> restored_df = pd.read_parquet(BytesIO(df_parquet_bytes))
    >>> restored_df
       foo  bar
    0    0    5
    1    1    6
    2    2    7
    3    3    8
    4    4    9
    >>> restored_df.equals(original_df)
    True
    >>> restored_bar = pd.read_parquet(BytesIO(df_parquet_bytes), columns=["bar"])
    >>> restored_bar
        bar
    0    5
    1    6
    2    7
    3    8
    4    9
    >>> restored_bar.equals(original_df[["bar"]])
    True

    The function uses `kwargs` that are passed directly to the engine.
    In the following example, we use the `filters` argument of the pyarrow
    engine to filter the rows of the DataFrame.

    Since `pyarrow` is the default engine, we can omit the `engine` argument.
    Note that the `filters` argument is implemented by the `pyarrow` engine,
    which can benefit from multithreading and also potentially be more
    economical in terms of memory.

    >>> sel = [("foo", ">", 2)]
    >>> restored_part = pd.read_parquet(BytesIO(df_parquet_bytes), filters=sel)
    >>> restored_part
        foo  bar
    0    3    8
    1    4    9
    r"   rÄ   r)   )rs   rž   r@   r    rŠ   r¡   )	r
   r®   r0   r1   r   r   r8   r   rt   )
rX   r%   rs   r@   r    rŠ   rž   r¡   ro   rÇ   s
             r7   Úread_parquetrË   =  s�   € ð\ ”S—^‘^Ñ#¨°&Ò(8Ü�‰ð+ô Ü'Ó)õ	
ð ”—‘ÑØˆÜ�fÓ€DÜ˜Ô&àˆ4�9‰9Øð	àØØ'Ø#ØØ)ñ	ð ñ	ð 	rj   )r%   r/   ru   r    )Nr=   F)rX   z1FilePath | ReadBuffer[bytes] | WriteBuffer[bytes]r\   r   r@   rª   r]   r/   r^   Úboolru   zVtuple[FilePath | ReadBuffer[bytes] | WriteBuffer[bytes], IOHandles[bytes] | None, Any])rh   r   rX   z$FilePath | WriteBuffer[bytes] | Noner%   ústr | lib.NoDefaultrF   r   r–   r©   r@   rª   r‰   r«   rŠ   r   ru   zbytes | None)rX   zFilePath | ReadBuffer[bytes]r%   rÍ   rs   r«   r@   rª   r    r¬   rŠ   r   rž   z:list[tuple[Any, ...]] | list[list[tuple[Any, ...]]] | Noner¡   r­   ru   r   )8Ú__doc__Ú
__future__r   r#   r�   rW   Útypingr   r   r   r0   r   r   Úpandas._config.configr	   r+   Úpandas._libsr
   Úpandas.compat._optionalr   Úpandas.errorsr   r   Úpandas.util._decoratorsr   Úpandas.util._exceptionsr   Úpandas.util._validatorsr   r‚   r   Úpandas.io._utilr   r   Úpandas.io.commonr   r   r   r   r   r   Úpandas._typingr   r   r   r   r   r   r8   re   r    r,   r-   r®   rÉ   rË   rz   rj   r7   ú<module>rÛ      sþ  ðÙ å "ã 	Û Û 	÷ñ ó
 ÷õ
 ;å Ý >÷õ /Ý 4Ý 7å ÷÷÷ ñ ÷÷ ó%GðV .2ØØð^'Ø
;ð^'àð^'ð +ð^'ð ð	^'ð
 ð^'ðó^'÷B
(ñ 
(ôw �(ô w ôtu �hô u ðt 26Ø"%§.¡.Ø-5ØØ-1Ø'+ØðyØðyà
.ðyð  ðyð +ð	yð
 ðyð +ðyð %ðyð ðyð óyñx ˆHÓð #&§.¡.Ø $Ø-1Ø25·.±.ØØJNØ.2ðCØ
&ðCàðCð ðCð +ð	Cð
 0ðCð ðCð HðCð ,ðCð òCó ñCrj   