Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pandas/io/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pandas/io/__pycache__/feather_format.cpython-312.pyc

�

Mٜg[��^�dZddlmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lZdd
lmZddlmZddlmZdd
lmZerddlmZmZddlmZmZm Z m!Z!m"Z"e
ed��	d									dd��Z#e
ed��d	dd	e	jHf											dd��Z%y	)z feather-format compat �)�annotations)�
TYPE_CHECKING�Any)�using_pyarrow_string_dtype)�lib)�import_optional_dependency)�doc)�check_dtype_backendN)�	DataFrame)�_shared_docs)�arrow_string_types_mapper)�
get_handle)�Hashable�Sequence)�DtypeBackend�FilePath�
ReadBuffer�StorageOptions�WriteBuffer�storage_options)rc���td�ddlm}t|t�std��t
|d|d��5}|j||jfi|��ddd�y#1swYyxYw)	a	
    Write a DataFrame to the binary Feather format.

    Parameters
    ----------
    df : DataFrame
    path : str, path object, or file-like object
    {storage_options}
    **kwargs :
        Additional keywords passed to `pyarrow.feather.write_feather`.

    �pyarrowr��featherz'feather only support IO with DataFrames�wbF�r�is_textN)	rrr�
isinstancer�
ValueErrorr�
write_feather�handle)�df�pathr�kwargsr�handless      �C/usr/local/lib/python3.12/site-packages/pandas/io/feather_format.py�
to_featherr'&sd��&�y�)���b�)�$��B�C�C�	��d�O�U�
�	�����b�'�.�.�;�F�;�
�
�
�s�A$�$A-Tc��td�ddlm}ddl}t	|�t|d|d��5}|tjur:t�s0|j|j|t|���cddd�S|j|j|t|���}|d	k(r0dd
l
m}	|j|	�j ��cddd�S|dk(r)|jt"j$��cddd�St�r#|jt'���cddd�St(�#1swYyxYw)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}

    dtype_backend : {{'numpy_nullable', 'pyarrow'}}, default 'numpy_nullable'
        Back-end data type applied to the resultant :class:`DataFrame`
        (still experimental). Behaviour is as follows:

        * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
          (default).
        * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
          DataFrame.

        .. versionadded:: 2.0

    Returns
    -------
    type of object stored in file

    Examples
    --------
    >>> df = pd.read_feather("path/to/file.feather")  # doctest: +SKIP
    rrrN�rbFr)�columns�use_threads�numpy_nullable)�_arrow_dtype_mapping)�types_mapper)rrr�(pandas.core.arrays.arrow.extension_typesr
rr�
no_defaultr�read_featherr!�bool�
read_table�pandas.io._utilr-�	to_pandas�get�pd�
ArrowDtyper
�NotImplementedError)
r#r*r+r�
dtype_backendr�pandasr%�pa_tabler-s
          r&r1r1Es-��V�y�)��4��
�&�	��d�O�U�
�	��C�N�N�*�3M�3O��'�'�����T�+�=N�(��	
�
��%�%��N�N�G��k�9J�&�
���,�,�<��%�%�3G�3I�3M�3M�%�N�
�
�"�i�
'��%�%�2�=�=�%�A�%
�
�((�
)��%�%�3L�3N�%�O�+
�
�.&�%�/
�
�s%�AD:�=AD:�$D:�#D:�4D:�:E)N)
r"rr#zFilePath | WriteBuffer[bytes]r�StorageOptions | Noner$r�return�None)r#zFilePath | ReadBuffer[bytes]r*zSequence[Hashable] | Noner+r2rr=r:zDtypeBackend | lib.NoDefaultr>r)&�__doc__�
__future__r�typingrr�pandas._configr�pandas._libsr�pandas.compat._optionalr�pandas.util._decoratorsr	�pandas.util._validatorsr
r;r7�pandas.core.apir�pandas.core.shared_docsrr4r
�pandas.io.commonr�collections.abcrr�pandas._typingrrrrrr'r0r1��r&�<module>rOs���"��
6��>�'�7��%�0�5�'���
���\�"3�4�5�.2�<��<�
'�<�+�<��	<�

�<�6�<�<�\�"3�4�5�*.��-1�25�.�.�I&�
&�I&�
&�I&��I&�+�	I&�
0�I&��
I&�6�I&rN

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists