B
    Y0d                 @  sh   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 erPddlmZ dd	d
ddddZdS )z orc compat     )annotations)TYPE_CHECKING)FilePathOrBuffer)import_optional_dependency)
get_handle)	DataFrameNr   zlist[str] | Noner   )pathcolumnsreturnc          	   K  sF   t d}t| ddd&}||j}|jf d|i| S Q R X 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
        Any valid string path is acceptable. 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``.

        If you want to pass in a path object, pandas accepts any
        ``os.PathLike``.

        By file-like object, we refer to objects with a ``read()`` method,
        such as a file handle (e.g. via builtin ``open`` function)
        or ``StringIO``.
    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   ?/var/www/html/venv/lib/python3.7/site-packages/pandas/io/orc.pyread_orc   s    &r   )N)__doc__
__future__r   typingr   Zpandas._typingr   Zpandas.compat._optionalr   Zpandas.io.commonr   Zpandasr   r   r   r   r   r   <module>   s   