+
    Ŝi_                       R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHtHtH	t	 ^ RI
HtHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHt ^ R
IHtHt ^ RIHt ^ RIHtHtH t H!t!H"t" ]'       d   ^ RI#H$t$H%t%H&t&H't'H(t(H)t) R R lt*RR R llt+ ! R R4      t, ! R R],4      t- ! R R],4      t.RR R llt/]! R4      RRR]P`                  RRR3R R ll4       t1R# ) z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WriteBufferc                    V ^8  d   QhRRRR/# )   enginestrreturnBaseImpl )formats   "Z/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/pandas/io/parquet.py__annotate__r%   4   s     G Gs Gx G    c                L   V R8X  d   \        R4      p V R8X  d.   \        \        .pRpV F  p V! 4       u # 	  \        RV 24      hV R8X  d   \        4       # V R8X  d   \        4       # \        R	4      h  \         d%   pTR\	        T4      ,           ,          p Rp?Kt  Rp?ii ; i)
zreturn our implementationautozio.parquet.engine z
 - NzUnable 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   &    r$   
get_enginer4   4   s    /0%7
*L1#~% + C l
 	
 }	=	   
E
FF%  1gC00
1s   A44B#?BB#c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   pathz1FilePath | ReadBuffer[bytes] | WriteBuffer[bytes]fsr   storage_optionsStorageOptions | Nonemoder   is_dirboolr    zVtuple[FilePath | ReadBuffer[bytes] | WriteBuffer[bytes], IOHandles[bytes] | None, Any]r"   )r#   s   "r$   r%   r%   V   sD     <' <'
;<'<' +<' 	<'
 <'<'r&   c                   \        V 4      pVe   \        RRR7      p\        RRR7      pVe0   \        WP                  4      '       d   V'       d   \	        R4      hMKVe'   \        WP
                  P                  4      '       d   M!\        R\        V4      P                   24      h\        V4      '       dv   Vfr   Vf5   \        R4      p\        R4      p VP                  P                  V 4      w  rVf5   \        R4      pVP                  P                  ! V3/ T;'       g    / B w  rM+V'       d$   \!        V4      '       d   VR	8w  d   \        R
4      hRp	V'       g`   V'       gX   \        V\"        4      '       dB   \$        P&                  P)                  V4      '       g   \+        WSRVR7      p	RpV	P,                  pWYV3#   \        TP                  3 d     Li ; i)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*   rbz8storage_options passed with buffer, or non-supported URLFis_textr8   )r   r	   
isinstance
FileSystemNotImplementedErrorspecAbstractFileSystemr/   type__name__r   from_uri	TypeErrorArrowInvalidcore	url_to_fsr   r   osr6   isdirr   handle)
r6   r7   r8   r:   r;   path_or_handlepa_fsr@   pahandless
   &&&&&     r$   _get_path_or_handlerW   V   s    $D)N	~*<I+HXFB0@0@!A!A)N   Jr;;3Q3Q$R$Rb**+-  ^$$"+I6B.|<E%*%5%5%>%>t%D" :/9F!'!6!6"#2#8#8b"B 
&"8"8DDL STTG~s++n--
 %
  B&&7 r/ s   G G G c                  H    ] tR t^t]R R l4       tR R ltR	R R lltRtR# )
r!   c                    V ^8  d   QhRRRR/# r   dfr   r    Noner"   )r#   s   "r$   r%   BaseImpl.__annotate__   s     L Ly LT Lr&   c                	H    \        V \        4      '       g   \        R 4      hR# )z+to_parquet only supports IO with DataFramesN)rD   r   r/   )r[   s   &r$   validate_dataframeBaseImpl.validate_dataframe   s     "i((JKK )r&   c                    V ^8  d   QhRRRR/# rZ   r"   )r#   s   "r$   r%   r]      s     ( (	 (4 (r&   c                	    \        V 4      hNr
   )selfr[   r6   compressionkwargss   &&&&,r$   writeBaseImpl.write       !$''r&   Nc                   V ^8  d   QhRR/# )r   r    r   r"   )r#   s   "r$   r%   r]      s     ( (I (r&   c                	    \        V 4      hrc   rd   )re   r6   columnsrg   s   &&&,r$   readBaseImpl.read   rj   r&   r"   rc   )	rJ   
__module____qualname____firstlineno__staticmethodr_   rh   rn   __static_attributes__r"   r&   r$   r!   r!      s%    L L(( (r&   r!   c                  b    ] tR t^tR R ltR	R R lltRR]P                  RRR3R R lltRt	R# )
r,   c                   V ^8  d   QhRR/# r   r    r\   r"   )r#   s   "r$   r%   PyArrowImpl.__annotate__   s     	 	$ 	r&   c                	<    \        R RR7       ^ RIp^ RIpWn        R# )r*   z(pyarrow is required for parquet support.extraN)r	   pyarrow.parquet(pandas.core.arrays.arrow.extension_typesapi)re   r*   pandass   &  r$   __init__PyArrowImpl.__init__   s    "G	
 	 	8r&   Nc               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r   r[   r   r6   zFilePath | WriteBuffer[bytes]rf   r   indexbool | Noner8   r9   partition_colslist[str] | Noner    r\   r"   )r#   s   "r$   r%   rx      sY     @  @ @  ,@  /	@ 
 @  /@  )@  
@ r&   c           	     	   V P                  V4       R VP                  R R4      /p	Ve   WIR&   V P                  P                  P                  ! V3/ V	B p
VP
                  '       dP   R\        P                  ! VP
                  4      /pV
P                  P                  p/ VCVCpV
P                  V4      p
\        VVVRVRJR7      w  rp\        V\        P                  4      '       d   \        VR4      '       dn   \        VP                   \"        \$        34      '       dH   \        VP                   \$        4      '       d   VP                   P'                  4       pMVP                   p Ve0   V P                  P(                  P*                  ! V
V3RVRVR	V/VB  M,V P                  P(                  P,                  ! V
V3RVR	V/VB  Ve   VP/                  4        R# R#   Te   TP/                  4        i i ; i)
schemaNpreserve_indexPANDAS_ATTRSwb)r8   r:   r;   namerf   r   
filesystem)r_   popr~   Tablefrom_pandasattrsjsondumpsr   metadatareplace_schema_metadatarW   rD   ioBufferedWriterhasattrr   r   bytesdecodeparquetwrite_to_datasetwrite_tableclose)re   r[   r6   rf   r   r8   r   r   rg   from_pandas_kwargstabledf_metadataexisting_metadatamerged_metadatarS   rV   s   &&&&&&&&,       r$   rh   PyArrowImpl.write   s    	#.6

8T8R-S38/0**2D1CD888)4::bhh+?@K % 5 5B!2BkBO11/BE.A+!-/
+ ~r'8'899//>..e==.--u55!/!4!4!;!;!=!/!4!4	 )  11" !, $2	
  *    ,," !,  *	
  " #w" #s   +AG" "G9c               (    V ^8  d   QhRRRRRRRR/# )	r   dtype_backendDtypeBackend | lib.NoDefaultr8   r9   to_pandas_kwargszdict[str, Any] | Noner    r   r"   )r#   s   "r$   r%   rx      s4     .  . 
 4.  /.  0.  
. r&   c           	     	f   R VR&   \        VVVRR7      w  rp V P                  P                  P                  ! V	3RVRVRV/VB p\	        4       ;_uu_ 4        \        RR\        4       \        VVVR	7      pR
R
R
4       VP                  P                  '       dT   RVP                  P                  9   d9   VP                  P                  R,          p\        P                  ! V4      Xn        XV
e   V
P                  4        # #   + '       g   i     L; i  T
e   T
P                  4        i i ; i)Tuse_pandas_metadatarA   )r8   r:   rm   r   filtersr>   make_block is deprecated)r   r   Ns   PANDAS_ATTRS)rW   r~   r   
read_tabler   r   r   r   r   r   r   loadsr   r   )re   r6   rm   r   r   r8   r   r   rg   rS   rV   pa_tableresultr   s   &&&&&&&&,     r$   rn   PyArrowImpl.read   s'    )-$%.A+	/
+	 xx''22 &  	
 H  !!."
 /"/%5 " '''"hoo&>&>>"*//":":?"KK#'::k#:FL" #% "!$ " #s*   ?D  D8#D AD D	D D0r~   snappyNNNN)
rJ   rp   rq   rr   r   rh   r   
no_defaultrn   rt   r"   r&   r$   r,   r,      s0    	@ J 69nn1526.  . r&   r,   c                  B    ] tR tRtR R ltR
R R lltRR R lltR	tR# )r-   i!  c                   V ^8  d   QhRR/# rw   r"   )r#   s   "r$   r%   FastParquetImpl.__annotate__"  s      $ r&   c                	,    \        R RR7      pWn        R# )r+   z,fastparquet is required for parquet support.rz   N)r	   r~   )re   r+   s   & r$   r   FastParquetImpl.__init__"  s     1!O
 r&   Nc               (    V ^8  d   QhRRRRRRRR/# )	r   r[   r   rf   z*Literal['snappy', 'gzip', 'brotli'] | Noner8   r9   r    r\   r"   )r#   s   "r$   r%   r   *  s3     3 33 @	3 /3 
3r&   c                	  aa	 V P                  V4       R V9   d   Ve   \        R4      hR V9   d   VP                  R 4      pVe   RVR&   Ve   \        R4      h\	        V4      p\        V4      '       d   \        R4      o	V	V3R lVR&   MS'       d   \        R	4      h\        R
R7      ;_uu_ 4        V P                  P                  ! VV3RVRVR V/VB  RRR4       R#   + '       g   i     R# ; i)partition_onNzYCannot use both partition_on and partition_cols. Use partition_cols for partitioning datahivefile_scheme9filesystem is not implemented for the fastparquet engine.r@   c                \   < SP                   ! V R 3/ S;'       g    / B P                  4       # )r   )open)r6   _r@   r8   s   &&r$   <lambda>'FastParquetImpl.write.<locals>.<lambda>M  s/    &++d3.44"3df3r&   	open_withz?storage_options passed with file object or non-fsspec file pathT)recordrf   write_index)
r_   r/   r   rF   r   r   r	   r   r~   rh   )
re   r[   r6   rf   r   r   r8   r   rg   r@   s
   &&&&&&f&,@r$   rh   FastParquetImpl.write*  s    	#V#(BK  V##ZZ7N%$*F=!!%K 
 d#/9F#F; Q  4((HHNN ( "	
 ,  )(((s   3%C""C3	c               $    V ^8  d   QhRRRRRR/# )r   r8   r9   r   dict | Noner    r   r"   )r#   s   "r$   r%   r   _  s*     7  7 
 /7  &7  
7 r&   c           	     	   / pVP                  R \        P                  4      p	RVR&   V	\        P                  Jd   \        R4      hVe   \	        R4      hVe   \	        R4      h\        V4      pRp
\        V4      '       d8   \        R4      pVP                  ! VR3/ T;'       g    / B P                  VR	&   MV\        V\        4      '       dA   \        P                  P                  V4      '       g   \        VRRVR
7      p
V
P                   p V P"                  P$                  ! V3/ VB p\'        4       ;_uu_ 4        \)        RR\*        4       VP,                  ! RRVRV/VB uuRRR4       V
e   V
P/                  4        # #   + '       g   i     M; i T
e   T
P/                  4        R# R#   T
e   T
P/                  4        i i ; i)r   Fpandas_nullszHThe 'dtype_backend' argument is not supported for the fastparquet engineNr   z?to_pandas_kwargs is not implemented for the fastparquet engine.r@   rA   r7   rB   r>   r   rm   r   r"   )r   r   r   r/   rF   r   r   r	   r   r7   rD   r   rP   r6   rQ   r   rR   r~   ParquetFiler   r   r   	to_pandasr   )re   r6   rm   r   r8   r   r   rg   parquet_kwargsr   rV   r@   parquet_files   &&&&&&&,     r$   rn   FastParquetImpl.read_  s    *,

?CNNC).~&.%  !%K  '%Q  d#/9F#);;tT#Uo>S>SQS#U#X#XN4 c""277==+>+> !dE?G >>D	 88//GGL!!."
 $-- #-48> "! " # "!! " #w" #s$   /F3  'F'
F3 F	F3 3G
r   r   )NNNNN)rJ   rp   rq   rr   r   rh   rn   rt   r"   r&   r$   r-   r-   !  s    3j7  7 r&   r-   r(   c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# )r   r[   r   r6   z$FilePath | WriteBuffer[bytes] | Noner   r   rf   r   r   r   r8   r9   r   r   r   r   r    zbytes | Noner"   )r#   s   "r$   r%   r%     sm     ` ``
.` ` +	`
 ` +` %` ` `r&   c                ,   \        V\        4      '       d   V.p\        V4      p	Vf   \        P                  ! 4       MTp
V	P
                  ! V V
3RVRVRVRVRV/VB  Vf3   \        V
\        P                  4      '       g   Q hV
P                  4       # R# )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
Nrf   r   r   r8   r   )rD   r   r4   r   BytesIOrh   getvalue)r[   r6   r   rf   r   r8   r   r   rg   implpath_or_bufs   &&&&&&&&,  r$   
to_parquetr     s    V .#&&()fDAESWKJJ
	  	 		
 &	 (	 	 	 |+rzz2222##%%r&   r   c               <    V ^8  d   QhRRRRRRRRR	R
RRRRRRRR/	# )r   r6   zFilePath | ReadBuffer[bytes]r   r   rm   r   r8   r9   r   r   r   r   r   z&list[tuple] | list[list[tuple]] | Noner   r   r    r   r"   )r#   s   "r$   r%   r%     sm     k k
&kk k +	k
 0k k 4k "k kr&   c                l    \        V4      p	\        V4       V	P                  ! V 3RVRVRVRVRVRV/VB # )aQ  
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
rm   r   r8   r   r   r   )r4   r   rn   )
r6   r   rm   r8   r   r   r   r   rg   r   s
   &&&&&&&&, r$   read_parquetr     so    @ fD&99		 	 (		
 $	 	 *	 	 	r&   )NrA   F)Nr(   r   NNNN)2__doc__
__future__r   r   r   rP   typingr   r   r   warningsr   r   pandas._libsr   pandas.compat._optionalr	   pandas.errorsr
   r   pandas.util._decoratorsr   pandas.util._validatorsr   r   r   r   pandas.io._utilr   pandas.io.commonr   r   r   r   r   pandas._typingr   r   r   r   r   r   r4   rW   r!   r,   r-   r   r   r   r"   r&   r$   <module>r      s     " 	  	 

  > / 7
 2   GD<'~
( 
(| ( | ~u h u p`F H  $-125..6:$(k kr&   