
    `Vg                        d Z ddlmZ ddlmZmZ ddlmZmZm	Z	m
Z
 ddlmZ ddlmZ ddlmZmZmZ ddlmZ dd	lmZ  eed
         	 d	 	 	 	 	 	 	 dd       Z eed
         	 	 	 d	 	 	 	 	 	 	 dd       Zy)z feather-format compat     )annotations)HashableSequence)FilePath
ReadBufferStorageOptionsWriteBuffer)import_optional_dependency)doc)	DataFrame
Int64Index
RangeIndex)_shared_docs)
get_handlestorage_options)r   Nc           	        t        d       ddlm} t        | t              st        d      ddh}t        | j                  t        t        f      s$t        | j                        }t        d| d      | j                  j                  t        j                  t        t        |                         st        d	      | j                  j                  t        d      | j                  j                   |vrt        d      t#        |d|d      5 } |j$                  | |j&                  fi | d
d
d
       y
# 1 sw Y   y
xY w)aK  
    Write a DataFrame to the binary Feather format.

    Parameters
    ----------
    df : DataFrame
    path : str, path object, or file-like object
    {storage_options}

        .. versionadded:: 1.2.0

    **kwargs :
        Additional keywords passed to `pyarrow.feather.write_feather`.

        .. versionadded:: 1.1.0
    pyarrowr   featherz'feather only support IO with DataFramesstringunicodez%feather does not support serializing zG for the index; you can .reset_index() to make the index into column(s)zfeather does not support serializing a non-default index for the index; you can .reset_index() to make the index into column(s)Nz=feather does not serialize index meta-data on a default indexz%feather must have string column nameswbFr   is_text)r
   r   r   
isinstancer   
ValueErrorindexr   r   typeequals
from_rangerangelennamecolumnsinferred_typer   write_featherhandle)dfpathr   kwargsr   valid_typestyphandless           Y/var/www/html/hubwallet-dev/venv/lib/python3.12/site-packages/pandas/io/feather_format.py
to_featherr/      s-   . y)b)$BCCY'K bhhZ 89288n3C5 9U U
 	

 88??:00s2w@AF
 	

 
xx}} K
 	
 
zz{2@AA	dOU
 <	b'..;F;< < <s   D;;Ec                    t        d       ddlm} t        | d|d      5 }|j	                  |j
                  |t        |            cddd       S # 1 sw Y   yxY w)	a   
    Load a feather-format object from the file path.

    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, and file. For file URLs, a host is
        expected. A local file could be: ``file://localhost/path/to/table.feather``.
    columns : sequence, default None
        If not provided, all columns are read.
    use_threads : bool, default True
        Whether to parallelize reading using multiple threads.
    {storage_options}

        .. versionadded:: 1.2.0

    Returns
    -------
    type of object stored in file
    r   r   r   rbFr   )r$   use_threadsN)r
   r   r   r   read_featherr'   bool)r)   r$   r2   r   r   r-   s         r.   r3   r3   `   s[    : y)	dOU
 
	##NNGk9J $ 
	
 
 
s   'AA)N)r(   r   r)   zFilePath | WriteBuffer[bytes]r   r   returnNone)NTN)r)   zFilePath | ReadBuffer[bytes]r$   zSequence[Hashable] | Noner2   r4   r   r   )__doc__
__future__r   typingr   r   pandas._typingr   r   r   r	   pandas.compat._optionalr
   pandas.util._decoratorsr   pandas.core.apir   r   r   pandas.core.shared_docsr   pandas.io.commonr   r/   r3        r.   <module>rB      s     "
  ? ' 
 1 ' \"345 '+@<@<
'@< $@<
 
@< 6@<F \"345 *.&*	%

&%
&%
 %
 $	%
 6%
rA   