
    d$                    *   d 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 ddlmZ ddlmZ ddlmZ dd	lZdd
l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	ej        fd"d            Zd	S )#z feather-format compat     )annotations)HashableSequence)lib)DtypeBackendFilePath
ReadBufferStorageOptionsWriteBuffer)import_optional_dependency)doc)check_dtype_backendN)	DataFrame
RangeIndex)_shared_docs)
get_handlestorage_options)r   dfr   pathFilePath | WriteBuffer[bytes]r
   returnNonec           	        t          d           ddlm} t          | t                    st          d          ddh}| j        j        dk    s't          | j                  }t          d| d	          | 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           dS # 1 swxY w Y   dS )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unicodeint64z%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indexdtypetypeequalsr   
from_rangerangelennamecolumnsinferred_typer   write_featherhandle)r   r   r   kwargsr   valid_typestyphandless           T/var/www/html/t/fyr/venv311/lib/python3.11/site-packages/pandas/io/feather_format.py
to_featherr6      s   . y)))b)$$ DBCCCY'K 8>W$$28nnUC U U U
 
 	

 8??:0s2ww@@AA 
F
 
 	

 
x} K
 
 	
 
z{22@AAA	dOU
 
 
 <	b'.;;F;;;< < < < < < < < < < < < < < < < < <s   D77D;>D;TFilePath | ReadBuffer[bytes]r-   Sequence[Hashable] | Noneuse_threadsbooldtype_backendDtypeBackend | lib.NoDefaultc                ^   t          d           ddlm} t          |           t	          | d|d          5 }|t
          j        u r6|                    |j        |t          |                    cddd           S |
                    |j        |t          |                    }|d	k    r5dd
lm} |                     |            j                  cddd           S |dk    r,|                    t          j                  cddd           S 	 ddd           dS # 1 swxY w Y   dS )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

    dtype_backend : {{"numpy_nullable", "pyarrow"}}, defaults to NumPy backed DataFrames
        Which dtype_backend to use, e.g. whether a DataFrame should have NumPy
        arrays, nullable dtypes are used for all dtypes that have a nullable
        implementation when "numpy_nullable" is set, pyarrow is used for all
        dtypes if "pyarrow" is set.

        The dtype_backends are still experimential.

        .. versionadded:: 2.0

    Returns
    -------
    type of object stored in file
    r   r   r   rbFr!   )r-   r9   Nnumpy_nullable)_arrow_dtype_mapping)types_mapper)r   r   r   r   r   r   
no_defaultread_featherr0   r:   
read_tablepandas.io._utilr@   	to_pandasgetpd
ArrowDtype)	r   r-   r9   r   r;   r   r4   pa_tabler@   s	            r5   rC   rC   c   s"   P y)))&&&	dOU
 
 
 B	CN**''T+=N=N (  	B B B B B B B B %%NGk9J9J & 
 
 ,,,<<<<<<%%3G3G3I3I3M%NNB B B B B B B B" i''%%2=%AA%B B B B B B B B" (#B B B B B B B B B B B B B B B B B Bs   8D"=AD""%D""D&)D&)N)r   r   r   r   r   r
   r   r   )
r   r7   r-   r8   r9   r:   r   r
   r;   r<   ) __doc__
__future__r   typingr   r   pandas._libsr   pandas._typingr   r   r	   r
   r   pandas.compat._optionalr   pandas.util._decoratorsr   pandas.util._validatorsr   pandasrH   pandas.core.apir   r   pandas.core.shared_docsr   pandas.io.commonr   r6   rB   rC        r5   <module>rY      s     " " " " " "       
                    ? > > > > > ' ' ' ' ' ' 7 7 7 7 7 7            1 0 0 0 0 0 ' ' ' ' ' ' \"34555 '+@< @< @< @< 65@<F \"34555 *.&*25.>B >B >B >B 65>B >B >BrX   