§
    tŠtj…_  ã                  ó´  — 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
mZ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mZ ddlmZ ddl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„Z*	 	 	 d?d@d „Z+ G d!„ d¦  «        Z, G d"„ d#e,¦  «        Z- G d$„ d%e,¦  «        Z.	 	 	 	 	 	 	 dAdBd3„Z/ ed4¦  «        d&ddej0        dddfdCd=„¦   «         Z1dS )Dzparquet compaté    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚLiteral)Úcatch_warningsÚfilterwarnings)Úlib)Úimport_optional_dependency)ÚAbstractMethodErrorÚPandas4Warning)Ú
set_module)Úcheck_dtype_backend)Ú	DataFrameÚ
get_option)Úarrow_table_to_pandas)Ú	IOHandlesÚ
get_handleÚis_fsspec_urlÚis_urlÚstringify_path)ÚDtypeBackendÚFilePathÚParquetCompressionOptionsÚ
ReadBufferÚStorageOptionsÚWriteBufferÚengineÚstrÚreturnÚBaseImplc                ód  — | dk    rt          d¦  «        } | dk    r_t          t          g}d}|D ]:}	  |¦   «         c S # t          $ r}|dt	          |¦  «        z   z  }Y d}~Œ3d}~ww xY wt          d|› �¦  «        ‚| dk    rt          ¦   «         S | dk    rt          ¦   «         S t          d	¦  «        ‚)
zreturn our implementationÚautoz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Úfastparquetz.engine must be one of 'pyarrow', 'fastparquet')r   ÚPyArrowImplÚFastParquetImplÚImportErrorr   Ú
ValueError)r   Úengine_classesÚ
error_msgsÚengine_classÚerrs        úO/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/pandas/io/parquet.pyÚ
get_enginer/   4   sþ   € à�ÒÐÝÐ/Ñ0Ô0ˆà�ÒÐå%¥Ð7ˆàˆ
Ø*ð 	1ð 	1ˆLð1Ø#�|‘~”~Ð%Ð%Ð%øÝð 1ð 1ð 1Ø˜g­¨C©¬Ñ0Ñ0�
�
�
�
�
�
øøøøð1øøøõ ðð ðð ñ
ô 
ð 	
ð �ÒÐÝ‰}Œ}ÐØ	�=Ò	 Ð	 ÝÑ Ô Ð å
ÐEÑ
FÔ
FÐFs   ±	=½
A&ÁA!Á!A&ÚrbFÚpathú1FilePath | ReadBuffer[bytes] | WriteBuffer[bytes]Úfsr   Ústorage_optionsúStorageOptions | NoneÚmodeÚis_dirÚboolúVtuple[FilePath | ReadBuffer[bytes] | WriteBuffer[bytes], IOHandles[bytes] | None, Any]c                ó`  — t          | ¦  «        }|�Œt          dd¬¦  «        }t          dd¬¦  «        }|�'t          ||j        ¦  «        r|rt	          d¦  «        ‚nA|�t          ||j        j        ¦  «        rn$t          dt          |¦  «        j	        › �¦  «        ‚t          |¦  «        r‚|€€|€Tt          d¦  «        }t          d¦  «        }	 |j                             | ¦  «        \  }}n# t          |j        f$ r Y nw xY w|€'t          d¦  «        } |j        j        |fi |pi ¤Ž\  }}n&|r$t!          |¦  «        r|d	k    rt          d
¦  «        ‚d}	|sR|sPt          |t"          ¦  «        r;t$          j                             |¦  «        st+          ||d|¬¦  «        }	d}|	j        }||	|fS )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$   r0   z8storage_options passed with buffer, or non-supported URLF©Úis_textr4   )r   r
   Ú
isinstanceÚ
FileSystemÚNotImplementedErrorÚspecÚAbstractFileSystemr)   ÚtypeÚ__name__r   Úfrom_uriÚ	TypeErrorÚArrowInvalidÚcoreÚ	url_to_fsr   r   Úosr1   Úisdirr   Úhandle)
r1   r3   r4   r6   r7   Úpath_or_handleÚpa_fsr=   ÚpaÚhandless
             r.   Ú_get_path_or_handlerS   V   s2  € õ $ DÑ)Ô)€NØ	€~Ý*¨<ÀÐIÑIÔIˆÝ+¨H¸XÐFÑFÔFˆØÐ¥¨B°Ô0@Ñ!AÔ!AÐØð Ý)ØNñô ð ðð Ð¥J¨r°6´;Ô3QÑ$RÔ$RÐØåð-Ý˜b™œÔ*ð-ð -ñô ð õ �^Ñ$Ô$ð U¨¨ØÐ"Ý+¨IÑ6Ô6ˆBÝ.¨|Ñ<Ô<ˆEðØ%*Ô%5×%>Ò%>¸tÑ%DÔ%DÑ"��N�NøÝ˜rœÐ/ð ð ð Ø�ðøøøàˆ:Ý/°Ñ9Ô9ˆFØ!6 ¤Ô!6Øð"ð "Ø#2Ð#8°bð"ð "ÑˆB�øð 
ð U¥&¨Ñ"8Ô"8ð U¸DÀDºL¸Lõ ÐSÑTÔTÐTà€Gàð(àð(õ �~¥sÑ+Ô+ð(õ ”—’˜nÑ-Ô-ð	(õ Ø˜D¨%Àð
ñ 
ô 
ˆð ˆØ œˆØ˜7 BÐ&Ð&s   ÃC. Ã.DÄDc                  ó8   — e Zd Zed	d„¦   «         Zd	d„Zd
dd„ZdS )r    Údfr   r   ÚNonec                óN   — t          | t          ¦  «        st          d¦  «        ‚d S )Nz+to_parquet only supports IO with DataFrames)r@   r   r)   )rU   s    r.   Úvalidate_dataframezBaseImpl.validate_dataframe–   s0   € å˜"�iÑ(Ô(ð 	LÝÐJÑKÔKÐKð	Lð 	Ló    c                ó    — t          | ¦  «        ‚©N©r   )ÚselfrU   r1   ÚcompressionÚkwargss        r.   ÚwritezBaseImpl.write›   ó   € Ý! $Ñ'Ô'Ð'rY   Nc                ó    — t          | ¦  «        ‚r[   r\   )r]   r1   Úcolumnsr_   s       r.   ÚreadzBaseImpl.readž   ra   rY   )rU   r   r   rV   r[   )r   r   )rF   Ú
__module__Ú__qualname__ÚstaticmethodrX   r`   rd   © rY   r.   r    r    •   sc   € € € € € ØðLð Lð Lñ „\ðLð(ð (ð (ð (ð(ð (ð (ð (ð (ð (ð (rY   c                  óJ   — e Zd Zdd„Z	 	 	 	 	 ddd„Zddej        dddfdd„ZdS )r&   r   rV   c                óF   — t          dd¬¦  «         dd l}dd l}|| _        d S )Nr$   z(pyarrow is required for parquet support.©Úextrar   )r
   Úpyarrow.parquetÚ(pandas.core.arrays.arrow.extension_typesÚapi)r]   r$   Úpandass      r.   Ú__init__zPyArrowImpl.__init__£   sF   € Ý"ØÐGð	
ñ 	
ô 	
ð 	
ð 	ÐÐÐð 	8Ð7Ð7Ð7àˆŒˆˆrY   ÚsnappyNrU   r   r1   úFilePath | WriteBuffer[bytes]r^   r   Úindexúbool | Noner4   r5   Úpartition_colsúlist[str] | Nonec                óR  — |                       |¦  «         d|                     dd ¦  «        i}	|�||	d<    | j        j        j        |fi |	¤Ž}
|j        rBdt          j        |j        ¦  «        i}|
j        j	        }i |¥|¥}|
 
                    |¦  «        }
t          |||d|d u¬¦  «        \  }}}t          |t          j        ¦  «        rlt          |d¦  «        r\t          |j        t"          t$          f¦  «        r;t          |j        t$          ¦  «        r|j                             ¦   «         }n|j        }	 |� | j        j        j        |
|f|||dœ|¤Ž n | j        j        j        |
|f||dœ|¤Ž |�|                     ¦   «          d S d S # |�|                     ¦   «          w w xY w)	NÚschemaÚpreserve_indexÚPANDAS_ATTRSÚwb)r4   r6   r7   Úname)r^   rv   Ú
filesystem)r^   r~   )rX   Úpopro   ÚTableÚfrom_pandasÚattrsÚjsonÚdumpsry   ÚmetadataÚreplace_schema_metadatarS   r@   ÚioÚBufferedWriterÚhasattrr}   r   ÚbytesÚdecodeÚparquetÚwrite_to_datasetÚwrite_tableÚclose)r]   rU   r1   r^   rt   r4   rv   r~   r_   Úfrom_pandas_kwargsÚtableÚdf_metadataÚexisting_metadataÚmerged_metadatarO   rR   s                   r.   r`   zPyArrowImpl.write®   s(  € ð 	×Ò Ñ#Ô#Ð#à.6¸¿
º
À8ÈTÑ8RÔ8RÐ-SÐØÐØ38ÐÐ/Ñ0à*�””Ô*¨2ÐDÐDÐ1CÐDÐDˆàŒ8ð 	CØ)­4¬:°b´hÑ+?Ô+?Ð@ˆKØ %¤Ô 5ÐØBÐ!2ÐB°kÐBˆOØ×1Ò1°/ÑBÔBˆEå.AØØØ+ØØ!¨Ð-ð/
ñ /
ô /
Ñ+ˆ˜ õ �~¥rÔ'8Ñ9Ô9ð	5å˜¨Ñ/Ô/ð	5õ ˜>Ô.µµe°Ñ=Ô=ð	5õ
 ˜.Ô-­uÑ5Ô5ð 5Ø!/Ô!4×!;Ò!;Ñ!=Ô!=��à!/Ô!4�ð	 ØÐ)à1�”Ô Ô1ØØ"ðð !,Ø#1Ø)ðð ð ðð ð ð ð -�”Ô Ô,ØØ"ðð !,Ø)ð	ð ð
 ðð ð ð Ð"Ø—’‘”���ð #Ð"øˆwÐ"Ø—’‘”��ð #øøøs   Ä7<F ÆF&Údtype_backendúDtypeBackend | lib.NoDefaultÚto_pandas_kwargsúdict[str, Any] | Nonec                ó  — d|d<   t          |||d¬¦  «        \  }	}
}	  | j        j        j        |	f|||dœ|¤Ž}t	          ¦   «         5  t          ddt          ¦  «         t          |||¬¦  «        }d d d ¦  «         n# 1 swxY w Y   |j        j	        r9d	|j        j	        v r+|j        j	        d	         }t          j        |¦  «        |_        ||
�|
                     ¦   «          S S # |
�|
                     ¦   «          w w xY w)
NTÚuse_pandas_metadatar0   )r4   r6   )rc   r~   Úfiltersr;   úmake_block is deprecated)r•   r—   s   PANDAS_ATTRS)rS   ro   rŒ   Ú
read_tabler   r   r   r   ry   r…   rƒ   Úloadsr‚   r�   )r]   r1   rc   r›   r•   r4   r~   r—   r_   rO   rR   Úpa_tableÚresultr’   s                 r.   rd   zPyArrowImpl.readð   sŠ  € ð )-ˆÐ$Ñ%å.AØØØ+Øð	/
ñ /
ô /
Ñ+ˆ˜ ð	 Ø2�t”xÔ'Ô2ØðàØ%Øð	ð ð
 ðð ˆHõ  Ñ!Ô!ð 
ð 
ÝØØ.Ý"ñô ð õ
 /ØØ"/Ø%5ðñ ô �ð
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
øøøð 
ð 
ð 
ð 
ð ŒÔ'ð ;Ø" h¤oÔ&>Ð>Ð>Ø"*¤/Ô":¸?Ô"K�KÝ#'¤:¨kÑ#:Ô#:�F”LØàÐ"Ø—’‘”��ð #øˆwÐ"Ø—’‘”��ð #øøøs0   ž*C& Á)A=Á1C& Á=BÂC& ÂBÂA	C& Ã&C?©r   rV   ©rr   NNNN)rU   r   r1   rs   r^   r   rt   ru   r4   r5   rv   rw   r   rV   )r•   r–   r4   r5   r—   r˜   r   r   )rF   re   rf   rq   r`   r	   Ú
no_defaultrd   rh   rY   r.   r&   r&   ¢   s‡   € € € € € ð	ð 	ð 	ð 	ð 2:Ø!Ø15Ø+/Øð@ ð @ ð @ ð @ ð @ ðJ ØØ69´nØ15ØØ26ð. ð . ð . ð . ð . ð . ð . rY   r&   c                  ó>   — e Zd Zdd„Z	 	 	 	 	 ddd„Z	 	 	 	 	 ddd„ZdS )r'   r   rV   c                ó6   — t          dd¬¦  «        }|| _        d S )Nr%   z,fastparquet is required for parquet support.rk   )r
   ro   )r]   r%   s     r.   rq   zFastParquetImpl.__init__"  s+   € õ 1ØÐ!Oð
ñ 
ô 
ˆð ˆŒˆˆrY   rr   NrU   r   r^   ú*Literal['snappy', 'gzip', 'brotli'] | Noner4   r5   c                óÒ  ‡‡	— |                       |¦  «         d|v r|�t          d¦  «        ‚d|v r|                     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 ¦  «         d S # 1 swxY w Y   d S )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                óJ   •—  ‰j         | dfi ‰pi ¤Ž                      ¦   «         S )Nr|   )Úopen)r1   Ú_r=   r4   s     €€r.   ú<lambda>z'FastParquetImpl.write.<locals>.<lambda>M  s8   ø€ °+°&´+Ø�dð3ð 3Ø.Ð4°"ð3ð 3çŠd‰fŒfð rY   Ú	open_withz?storage_options passed with file object or non-fsspec file pathT)Úrecord)r^   Úwrite_indexr¨   )
rX   r)   r   rB   r   r   r
   r   ro   r`   )
r]   rU   r1   r^   rt   rv   r4   r~   r_   r=   s
         `  @r.   r`   zFastParquetImpl.write*  s­  øø€ ð 	×Ò Ñ#Ô#Ð#à˜VÐ#Ð#¨Ð(BÝðKñô ð ð ˜VÐ#Ð#Ø#ŸZšZ¨Ñ7Ô7ˆNàÐ%Ø$*ˆF�=Ñ!àÐ!Ý%ØKñô ð õ
 ˜dÑ#Ô#ˆÝ˜ÑÔð 
	Ý/°Ñ9Ô9ˆFð#ð #ð #ð #ð #ˆF�;ÑÐð ð 	ÝØQñô ð õ  4Ð(Ñ(Ô(ð 	ð 	ØˆDŒHŒNØØðð (Ø!Ø+ðð ð ðð ð ð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   Â6CÃC Ã#C r—   údict | Nonec                óX  — i }|                      dt          j        ¦  «        }	d|d<   |	t          j        urt          d¦  «        ‚|�t	          d¦  «        ‚|�t	          d¦  «        ‚t          |¦  «        }d }
t          |¦  «        r)t          d¦  «        } |j        |dfi |pi ¤Žj	        |d	<   nNt          |t          ¦  «        r9t          j                             |¦  «        st          |dd|¬
¦  «        }
|
j        }	  | j        j        |fi |¤Ž}t'          ¦   «         5  t)          ddt*          ¦  «          |j        d||dœ|¤Žcd d d ¦  «         |
�|
                     ¦   «          S S # 1 swxY w Y   	 |
�|
                     ¦   «          d S d S # |
�|
                     ¦   «          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=   r0   r3   r>   r;   rœ   )rc   r›   rh   )r   r	   r£   r)   rB   r   r   r
   r­   r3   r@   r   rL   r1   rM   r   rN   ro   ÚParquetFiler   r   r   Ú	to_pandasr�   )r]   r1   rc   r›   r4   r~   r—   r_   Úparquet_kwargsr•   rR   r=   Úparquet_files                r.   rd   zFastParquetImpl.read_  sY  € ð *,ˆØŸ
š
 ?µC´NÑCÔCˆà).ˆ�~Ñ&Ø¥¤Ð.Ð.Ýð%ñô ð ð Ð!Ý%ØKñô ð ð Ð'Ý%ØQñô ð õ ˜dÑ#Ô#ˆØˆÝ˜ÑÔð 	"Ý/°Ñ9Ô9ˆFà#. 6¤;¨t°TÐ#UÐ#U¸oÐ>SÐQSÐ#UÐ#UÔ#XˆN˜4Ñ Ð Ý˜�cÑ"Ô"ð 	"­2¬7¯=ª=¸Ñ+>Ô+>ð 	"õ !Ø�d E¸?ðñ ô ˆGð ”>ˆDð	 Ø/˜4œ8Ô/°ÐGÐG¸ÐGÐGˆLÝÑ!Ô!ð ð ÝØØ.Ý"ñô ð ð
 .�|Ô-ð Ø#¨Wðð Ø8>ðð ðð ð ð ñ ô ð ð Ð"Ø—’‘”��ð #ðð ð ð øøøð ð ð ð ð ð Ð"Ø—’‘”���ð #Ð"øˆwÐ"Ø—’‘”��ð #øøøs0   Ã?!F Ä &E*ÅF Å*E.Å.F Å1E.Å2F ÆF)r¡   r¢   )rU   r   r^   r¦   r4   r5   r   rV   )NNNNN)r4   r5   r—   r³   r   r   )rF   re   rf   rq   r`   rd   rh   rY   r.   r'   r'   !  s   € € € € € ðð ð ð ð CKØØØ15Øð3ð 3ð 3ð 3ð 3ðp ØØ15ØØ(,ð7 ð 7 ð 7 ð 7 ð 7 ð 7 ð 7 rY   r'   r"   rr   rU   r   ú$FilePath | WriteBuffer[bytes] | Noner^   r   rt   ru   rv   rw   r~   úbytes | Nonec           	     ó  — t          |t          ¦  «        r|g}t          |¦  «        }	|€t          j        ¦   «         n|}
 |	j        | |
f|||||dœ|¤Ž |€0t          |
t          j        ¦  «        sJ ‚|
                     ¦   «         S dS )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 Root Directory
        path when writing a partitioned dataset. The engine fastparquet does
        not accept file-like objects.
    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.
    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
    N)r^   rt   rv   r4   r~   )r@   r   r/   r‡   ÚBytesIOr`   Úgetvalue)rU   r1   r   r^   rt   r4   rv   r~   r_   ÚimplÚpath_or_bufs              r.   Ú
to_parquetrÁ   ™  s·   € õV �.¥#Ñ&Ô&ð *Ø(Ð)ˆÝ�fÑÔ€DàAEÀµ´±´°ÐSW€Kà€D„JØ
Øð	ð  ØØ%Ø'Øð	ð 	ð ð	ð 	ð 	ð €|Ý˜+¥r¤zÑ2Ô2Ð2Ð2Ð2Ø×#Ò#Ñ%Ô%Ð%àˆtrY   rp   úFilePath | ReadBuffer[bytes]rc   r•   r–   r›   ú&list[tuple] | list[list[tuple]] | Noner—   r³   c           
     óh   — t          |¦  «        }	t          |¦  «          |	j        | f||||||dœ|¤ŽS )aE  
    Load a parquet object from the file path, returning a DataFrame.

    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``.
        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.
    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
    )rc   r›   r4   r•   r~   r—   )r/   r   rd   )
r1   r   rc   r4   r•   r~   r›   r—   r_   r¿   s
             r.   Úread_parquetrÅ   ü  s_   € õ@ �fÑÔ€DÝ˜Ñ&Ô&Ð&àˆ4Œ9Øð	àØØ'Ø#ØØ)ð	ð 	ð ð	ð 	ð 	rY   )r   r   r   r    )Nr0   F)r1   r2   r3   r   r4   r5   r6   r   r7   r8   r   r9   )Nr"   rr   NNNN)rU   r   r1   rº   r   r   r^   r   rt   ru   r4   r5   rv   rw   r~   r   r   r»   )r1   rÂ   r   r   rc   rw   r4   r5   r•   r–   r~   r   r›   rÃ   r—   r³   r   r   )2Ú__doc__Ú
__future__r   r‡   rƒ   rL   Útypingr   r   r   Úwarningsr   r   Úpandas._libsr	   Úpandas.compat._optionalr
   Úpandas.errorsr   r   Úpandas.util._decoratorsr   Úpandas.util._validatorsr   rp   r   r   Úpandas.io._utilr   Úpandas.io.commonr   r   r   r   r   Úpandas._typingr   r   r   r   r   r   r/   rS   r    r&   r'   rÁ   r£   rÅ   rh   rY   r.   ú<module>rÒ      s>  ðØ Ð à "Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø €€€Ø 	€	€	€	ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð
 Ð Ð Ð Ð Ð Ø >Ð >Ð >Ð >Ð >Ð >ðð ð ð ð ð ð ð ð /Ð .Ð .Ð .Ð .Ð .Ø 7Ð 7Ð 7Ð 7Ð 7Ð 7ðð ð ð ð ð ð ð ð
 2Ð 1Ð 1Ð 1Ð 1Ð 1ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðGð Gð Gð GðJ .2ØØð<'ð <'ð <'ð <'ð <'ð~
(ð 
(ð 
(ð 
(ð 
(ñ 
(ô 
(ð 
(ð| ð | ð | ð | ð | �(ñ | ô | ð | ð~u ð u ð u ð u ð u �hñ u ô u ð u ðt 26ØØ-5ØØ-1Ø'+Øð`ð `ð `ð `ð `ðF €ˆHÑÔð Ø $Ø-1Ø25´.ØØ6:Ø$(ðkð kð kð kñ Ôðkð kð krY   