a
    oÝEb^  ã                   @  sl   d 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 erTddlmZ dd	d
ddœdd„ZdS )z orc compat é    )Úannotations)ÚTYPE_CHECKING)ÚFilePathÚ
ReadBuffer)Úimport_optional_dependency)Ú
get_handle)Ú	DataFrameNzFilePath | ReadBuffer[bytes]zlist[str] | Noner   )ÚpathÚcolumnsÚreturnc                 K  s^   t dƒ}t| ddd��4}| |j¡}|jf d|i|¤Ž ¡ W  d  ƒ S 1 sP0    Y  dS )a‚  
    Load an ORC object from the file path, returning a DataFrame.

    .. versionadded:: 1.0.0

    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.orc``.
    columns : list, default None
        If not None, only these columns will be read from the file.
    **kwargs
        Any additional kwargs are passed to pyarrow.

    Returns
    -------
    DataFrame

    Notes
    -------
    Before using this function you should read the :ref:`user guide about ORC <io.orc>`
    and :ref:`install optional dependencies <install.warn_orc>`.
    zpyarrow.orcÚrbF)Zis_textr
   N)r   r   ZORCFileÚhandleÚreadZ	to_pandas)r	   r
   ÚkwargsZorcZhandlesZorc_file© r   úM/home/ja/django-apps/lartica_env/lib/python3.9/site-packages/pandas/io/orc.pyÚread_orc   s     r   )N)Ú__doc__Ú
__future__r   Útypingr   Zpandas._typingr   r   Zpandas.compat._optionalr   Zpandas.io.commonr   Zpandasr   r   r   r   r   r   Ú<module>   s    ÿ