Sindbad~EG File Manager

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

�

Mٜg����L�ddlmZddlmZmZmZmZddlZddlm	Z	ddl
mZddlZddl
mZddlmZmZmZmZmZmZmZmZmZmZddlZddlZddlmZdd	lmZdd
l m!Z!ddl"m#Z#m$Z$ddl%m&Z&dd
l'm(Z(m)Z)ddl*m+Z+ddl,m-Z-ddl.m/Z/m0Z0m1Z1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;m<Z<m=Z=ddl>m?Z?m@Z@mAZAmBZBmCZCddlDmEZEddlFmGZGerddlHmIZIddlJmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTdedj�eVe!��dd��zdzZWe	d5d d d d d d d d d d d d d d d d d d d d d d d d d!�																																																	d6d#��ZXed d d d d d d d d d d d d d d d d d d d d d d d d!�																																																	d7d$��ZXe)e6d"�%�e(eW�	d8ddddddddddddd&d&d'd'ej�ddd(dddej�dd)�																																																			d9d*���ZXed+�ZZGd,�d-eeZ�Z[e)e6d"�%�Gd.�d/eeZ��Z\d0Z]d1Z^e_e`eae]e^fz��Zbe)e6d"�%�	d:					d;d2��ZcGd3�d4�Zdy)<�)�annotations)�Hashable�Iterable�Mapping�SequenceN)�partial)�BytesIO)�fill)
�IO�
TYPE_CHECKING�Any�Callable�Generic�Literal�TypeVar�Union�cast�overload)�config)�lib)�
STR_NA_VALUES)�get_version�import_optional_dependency)�EmptyDataError)�Appender�doc)�find_stack_level)�check_dtype_backend)�is_bool�is_float�
is_integer�is_list_like)�	DataFrame)�_shared_docs)�Version)�	IOHandles�
get_handle�stringify_path�validate_header_arg)�fill_mi_header�get_default_engine�
get_writer�maybe_convert_usecols�pop_header_name)�
TextParser)�validate_integer)�
TracebackType)
�DtypeArg�DtypeBackend�ExcelWriterIfSheetExists�FilePath�IntStrT�
ReadBuffer�Self�SequenceNotStr�StorageOptions�WriteExcelBuffera�
Read an Excel file into a ``pandas`` ``DataFrame``.

Supports `xls`, `xlsx`, `xlsm`, `xlsb`, `odf`, `ods` and `odt` file extensions
read from a local filesystem or URL. Supports an option to read
a single sheet or a list of sheets.

Parameters
----------
io : str, bytes, ExcelFile, xlrd.Book, 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.xlsx``.

    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``.

    .. deprecated:: 2.1.0
        Passing byte strings is deprecated. To read from a
        byte string, wrap it in a ``BytesIO`` object.
sheet_name : str, int, list, or None, default 0
    Strings are used for sheet names. Integers are used in zero-indexed
    sheet positions (chart sheets do not count as a sheet position).
    Lists of strings/integers are used to request multiple sheets.
    Specify ``None`` to get all worksheets.

    Available cases:

    * Defaults to ``0``: 1st sheet as a `DataFrame`
    * ``1``: 2nd sheet as a `DataFrame`
    * ``"Sheet1"``: Load sheet with name "Sheet1"
    * ``[0, 1, "Sheet5"]``: Load first, second and sheet named "Sheet5"
      as a dict of `DataFrame`
    * ``None``: All worksheets.

header : int, list of int, default 0
    Row (0-indexed) to use for the column labels of the parsed
    DataFrame. If a list of integers is passed those row positions will
    be combined into a ``MultiIndex``. Use None if there is no header.
names : array-like, default None
    List of column names to use. If file contains no header row,
    then you should explicitly pass header=None.
index_col : int, str, list of int, default None
    Column (0-indexed) to use as the row labels of the DataFrame.
    Pass None if there is no such column.  If a list is passed,
    those columns will be combined into a ``MultiIndex``.  If a
    subset of data is selected with ``usecols``, index_col
    is based on the subset.

    Missing values will be forward filled to allow roundtripping with
    ``to_excel`` for ``merged_cells=True``. To avoid forward filling the
    missing values use ``set_index`` after reading the data instead of
    ``index_col``.
usecols : str, list-like, or callable, default None
    * If None, then parse all columns.
    * If str, then indicates comma separated list of Excel column letters
      and column ranges (e.g. "A:E" or "A,C,E:F"). Ranges are inclusive of
      both sides.
    * If list of int, then indicates list of column numbers to be parsed
      (0-indexed).
    * If list of string, then indicates list of column names to be parsed.
    * If callable, then evaluate each column name against it and parse the
      column if the callable returns ``True``.

    Returns a subset of the columns according to behavior above.
dtype : Type name or dict of column -> type, default None
    Data type for data or columns. E.g. {{'a': np.float64, 'b': np.int32}}
    Use ``object`` to preserve data as stored in Excel and not interpret dtype,
    which will necessarily result in ``object`` dtype.
    If converters are specified, they will be applied INSTEAD
    of dtype conversion.
    If you use ``None``, it will infer the dtype of each column based on the data.
engine : {{'openpyxl', 'calamine', 'odf', 'pyxlsb', 'xlrd'}}, default None
    If io is not a buffer or path, this must be set to identify io.
    Engine compatibility :

    - ``openpyxl`` supports newer Excel file formats.
    - ``calamine`` supports Excel (.xls, .xlsx, .xlsm, .xlsb)
      and OpenDocument (.ods) file formats.
    - ``odf`` supports OpenDocument file formats (.odf, .ods, .odt).
    - ``pyxlsb`` supports Binary Excel files.
    - ``xlrd`` supports old-style Excel files (.xls).

    When ``engine=None``, the following logic will be used to determine the engine:

    - If ``path_or_buffer`` is an OpenDocument format (.odf, .ods, .odt),
      then `odf <https://pypi.org/project/odfpy/>`_ will be used.
    - Otherwise if ``path_or_buffer`` is an xls format, ``xlrd`` will be used.
    - Otherwise if ``path_or_buffer`` is in xlsb format, ``pyxlsb`` will be used.
    - Otherwise ``openpyxl`` will be used.
converters : dict, default None
    Dict of functions for converting values in certain columns. Keys can
    either be integers or column labels, values are functions that take one
    input argument, the Excel cell content, and return the transformed
    content.
true_values : list, default None
    Values to consider as True.
false_values : list, default None
    Values to consider as False.
skiprows : list-like, int, or callable, optional
    Line numbers to skip (0-indexed) or number of lines to skip (int) at the
    start of the file. If callable, the callable function will be evaluated
    against the row indices, returning True if the row should be skipped and
    False otherwise. An example of a valid callable argument would be ``lambda
    x: x in [0, 2]``.
nrows : int, default None
    Number of rows to parse.
na_values : scalar, str, list-like, or dict, default None
    Additional strings to recognize as NA/NaN. If dict passed, specific
    per-column NA values. By default the following values are interpreted
    as NaN: 'z', '�Fz    )�subsequent_indenta_'.
keep_default_na : bool, default True
    Whether or not to include the default NaN values when parsing the data.
    Depending on whether ``na_values`` is passed in, the behavior is as follows:

    * If ``keep_default_na`` is True, and ``na_values`` are specified,
      ``na_values`` is appended to the default NaN values used for parsing.
    * If ``keep_default_na`` is True, and ``na_values`` are not specified, only
      the default NaN values are used for parsing.
    * If ``keep_default_na`` is False, and ``na_values`` are specified, only
      the NaN values specified ``na_values`` are used for parsing.
    * If ``keep_default_na`` is False, and ``na_values`` are not specified, no
      strings will be parsed as NaN.

    Note that if `na_filter` is passed in as False, the ``keep_default_na`` and
    ``na_values`` parameters will be ignored.
na_filter : bool, default True
    Detect missing value markers (empty strings and the value of na_values). In
    data without any NAs, passing ``na_filter=False`` can improve the
    performance of reading a large file.
verbose : bool, default False
    Indicate number of NA values placed in non-numeric columns.
parse_dates : bool, list-like, or dict, default False
    The behavior is as follows:

    * ``bool``. If True -> try parsing the index.
    * ``list`` of int or names. e.g. If [1, 2, 3] -> try parsing columns 1, 2, 3
      each as a separate date column.
    * ``list`` of lists. e.g.  If [[1, 3]] -> combine columns 1 and 3 and parse as
      a single date column.
    * ``dict``, e.g. {{'foo' : [1, 3]}} -> parse columns 1, 3 as date and call
      result 'foo'

    If a column or index contains an unparsable date, the entire column or
    index will be returned unaltered as an object data type. If you don`t want to
    parse some cells as date just change their type in Excel to "Text".
    For non-standard datetime parsing, use ``pd.to_datetime`` after ``pd.read_excel``.

    Note: A fast-path exists for iso8601-formatted dates.
date_parser : function, optional
    Function to use for converting a sequence of string columns to an array of
    datetime instances. The default uses ``dateutil.parser.parser`` to do the
    conversion. Pandas will try to call `date_parser` in three different ways,
    advancing to the next if an exception occurs: 1) Pass one or more arrays
    (as defined by `parse_dates`) as arguments; 2) concatenate (row-wise) the
    string values from the columns defined by `parse_dates` into a single array
    and pass that; and 3) call `date_parser` once for each row using one or
    more strings (corresponding to the columns defined by `parse_dates`) as
    arguments.

    .. deprecated:: 2.0.0
       Use ``date_format`` instead, or read in as ``object`` and then apply
       :func:`to_datetime` as-needed.
date_format : str or dict of column -> format, default ``None``
   If used in conjunction with ``parse_dates``, will parse dates according to this
   format. For anything more complex,
   please read in as ``object`` and then apply :func:`to_datetime` as-needed.

   .. versionadded:: 2.0.0
thousands : str, default None
    Thousands separator for parsing string columns to numeric.  Note that
    this parameter is only necessary for columns stored as TEXT in Excel,
    any numeric columns will automatically be parsed, regardless of display
    format.
decimal : str, default '.'
    Character to recognize as decimal point for parsing string columns to numeric.
    Note that this parameter is only necessary for columns stored as TEXT in Excel,
    any numeric columns will automatically be parsed, regardless of display
    format.(e.g. use ',' for European data).

    .. versionadded:: 1.4.0

comment : str, default None
    Comments out remainder of line. Pass a character or characters to this
    argument to indicate comments in the input file. Any data between the
    comment string and the end of the current line is ignored.
skipfooter : int, default 0
    Rows at the end to skip (0-indexed).
{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

engine_kwargs : dict, optional
    Arbitrary keyword arguments passed to excel engine.

Returns
-------
DataFrame or dict of DataFrames
    DataFrame from the passed in Excel file. See notes in sheet_name
    argument for more information on when a dict of DataFrames is returned.

See Also
--------
DataFrame.to_excel : Write DataFrame to an Excel file.
DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file.
read_csv : Read a comma-separated values (csv) file into DataFrame.
read_fwf : Read a table of fixed-width formatted lines into DataFrame.

Notes
-----
For specific information on the methods used for each Excel engine, refer to the pandas
:ref:`user guide <io.excel_reader>`

Examples
--------
The file can be read using the file name as string or an open file object:

>>> pd.read_excel('tmp.xlsx', index_col=0)  # doctest: +SKIP
       Name  Value
0   string1      1
1   string2      2
2  #Comment      3

>>> pd.read_excel(open('tmp.xlsx', 'rb'),
...               sheet_name='Sheet3')  # doctest: +SKIP
   Unnamed: 0      Name  Value
0           0   string1      1
1           1   string2      2
2           2  #Comment      3

Index and header can be specified via the `index_col` and `header` arguments

>>> pd.read_excel('tmp.xlsx', index_col=None, header=None)  # doctest: +SKIP
     0         1      2
0  NaN      Name  Value
1  0.0   string1      1
2  1.0   string2      2
3  2.0  #Comment      3

Column types are inferred but can be explicitly specified

>>> pd.read_excel('tmp.xlsx', index_col=0,
...               dtype={{'Name': str, 'Value': float}})  # doctest: +SKIP
       Name  Value
0   string1    1.0
1   string2    2.0
2  #Comment    3.0

True, False, and NA values, and thousands separators have defaults,
but can be explicitly specified, too. Supply the values you would like
as strings or lists of strings!

>>> pd.read_excel('tmp.xlsx', index_col=0,
...               na_values=['string1', 'string2'])  # doctest: +SKIP
       Name  Value
0       NaN      1
1       NaN      2
2  #Comment      3

Comment lines in the excel input file can be skipped using the
``comment`` kwarg.

>>> pd.read_excel('tmp.xlsx', index_col=0, comment='#')  # doctest: +SKIP
      Name  Value
0  string1    1.0
1  string2    2.0
2     None    NaN
.)�header�names�	index_col�usecols�dtype�engine�
converters�true_values�false_values�skiprows�nrows�	na_values�keep_default_na�	na_filter�verbose�parse_dates�date_parser�date_format�	thousands�decimal�comment�
skipfooter�storage_options�
dtype_backendrTc��y�N���io�
sheet_namer>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUs                          �@/usr/local/lib/python3.12/site-packages/pandas/io/excel/_base.py�
read_excelr]u���H�c��yrWrXrYs                          r\r]r]�r^r_)rTTF�.)r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrU�
engine_kwargsc�J�t|�d}|�i}t|t�sd}t||||��}n|r||jk7rt	d��	|j||||||||	|
|||
|||||||||||��}|r|j
�|S#|r|j
�wwxYw)NFT)rTrCrbz_Engine should not be specified when passing an ExcelFile - ExcelFile already has the engine set)r[r>r?r@rArBrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrU)r�
isinstance�	ExcelFilerC�
ValueError�parse�close)rZr[r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrb�should_close�datas                             r\r]r]�s���J�
�&��L����
��b�)�$���
��+��'�	
��
�F�b�i�i�'��
B�
�	
�
��x�x�!������!�#�%����+���#�#�#����!�'�/�
��6��H�H�J��K����H�H�J��s�(B
�
B"�
_WorkbookTc�^�eZdZUded<		d					dd�Zedd��Zdd�Zdd�Zedd��Z	dd	�Z
dd
�Zddd�Zdd�Z
dd
�Z						d d�Z										d!d�Zdddddddddddddej$dddddej$f																																			d"d�Zy)#�BaseExcelReaderrk�bookNc��|�i}t|t�rt|�}t|ddi��|_t|t
|jf�st|d|d��|_t|jj|j�r|jj|_	yt|jjd�rR|jjjd�	|j|jj|�|_	ytd��#t$r|j��wxYw)	N�method)�handle�compression�rbF�rT�is_text�readrzCMust explicitly set engine if not passing in buffer or path for io.)rd�bytesr	r&�handlesre�_workbook_classr'rqrn�hasattr�seek�
load_workbook�	Exceptionrhrf)�self�filepath_or_bufferrTrbs    r\�__init__zBaseExcelReader.__init__"s��� ��M��(�%�0�!(�);�!<�� �%�H�d�3C�
����,�y�$�:N�:N�.O�P�%�"�D�/�SX��D�L��d�l�l�)�)�4�+?�+?�@����+�+�D�I�
�T�\�\�(�(�&�
1��L�L���$�$�Q�'�
� �.�.�t�|�|�/B�/B�M�R��	�
�U��
��	�
��
�
���
�s�0+D'�'Ec��t�rW��NotImplementedError�r~s r\ryzBaseExcelReader._workbook_classF���!�!r_c��t�rWr�)r~rrbs   r\r|zBaseExcelReader.load_workbookJ���!�!r_c��t|d�rat|jd�r|jj�n0t|jd�r|jj�|jj�y)Nrnrh�release_resources)rzrnrhr�rxr�s r\rhzBaseExcelReader.closeMs[���4�� ��t�y�y�'�*��	�	���!�����$7�8��	�	�+�+�-������r_c��t�rWr�r�s r\�sheet_nameszBaseExcelReader.sheet_namesZr�r_c��t�rWr��r~�names  r\�get_sheet_by_namez!BaseExcelReader.get_sheet_by_name^r�r_c��t�rWr�)r~�indexs  r\�get_sheet_by_indexz"BaseExcelReader.get_sheet_by_indexar�r_c��t�rWr�)r~�sheet�rowss   r\�get_sheet_datazBaseExcelReader.get_sheet_datadr�r_c�\�t|j�}||k\rtd|�d|�d���y)NzWorksheet index z
 is invalid, z worksheets found)�lenr�rf)r~r��n_sheetss   r\�raise_if_bad_sheet_by_indexz+BaseExcelReader.raise_if_bad_sheet_by_indexgs?���t�'�'�(���H���"�5�'��x�j�@Q�R��
�r_c�>�||jvrtd|�d���y)NzWorksheet named 'z' not found)r�rfr�s  r\�raise_if_bad_sheet_by_namez*BaseExcelReader.raise_if_bad_sheet_by_namens*���t�'�'�'��0���k�B�C�C�(r_c�H�d}d}||kr||�s|dz
}|dz
}||kr�|S)a�
        Determine how many file rows are required to obtain `nrows` data
        rows when `skiprows` is a function.

        Parameters
        ----------
        skiprows : function
            The function passed to read_excel by the user.
        rows_to_use : int
            The number of rows that will be needed for the header and
            the data.

        Returns
        -------
        int
        r�rX)r~rG�rows_to_use�i�rows_used_so_fars     r\�_check_skiprows_funcz$BaseExcelReader._check_skiprows_funcrsC��*
������,��A�;� �A�%� �
��F�A���,��r_c��|�y|�d}n9t|�rtt|�}d|z}ntt|�}d|dz}t	|�r%|�#tt|�}t|�dkDr|dz
}|�||zSt|�rtt|�}||z|zSt	|�r3dd�}tt|�}|j
t||�||z�St|�r|j
|||z�Sy)a
        If nrows specified, find the number of rows needed from the
        file, otherwise return None.


        Parameters
        ----------
        header : int, list of int, or None
            See read_excel docstring.
        index_col : int, str, list of int, or None
            See read_excel docstring.
        skiprows : list-like, int, callable, or None
            See read_excel docstring.
        nrows : int or None
            See read_excel docstring.

        Returns
        -------
        int or None
        Nr����c�
�||vSrWrX)rG�xs  r\�fz%BaseExcelReader._calc_rows.<locals>.f�s���H�}�$r_)rGrr��int�return�bool)	r!rr�rr"r�r�r�callable)r~r>r@rGrH�header_rowsr�s       r\�
_calc_rowszBaseExcelReader._calc_rows�s��6�=���>��K�
��
��#�v�&�F��f�*�K��(�F�+�F��f�R�j�.�K����I�$9��(�F�+�F��6�{�Q���q� ������&�&��h���C��*�H���&��1�1���!�
%��H�h�/�H��,�,�W�Q��-A�;�QV�CV�W�W��H���,�,���e�#��
�r_rFrac
�h	�t|�td|
�d}t|t�r|}d}n(|�|j}d}nt|t
�r|g}n|g}t
ttttt
fttj|�j���}i}d}|D�]�}|}|rtd|���t|t
�r|j|�}n|j|�}|j|||	|
�}|j!||�}t#|d�r|j%�t'|�}|st)�||<��d}d}t+|�r$t|t,�sJ�d}t/|�dk(rd}|rt
t,t|�d}d} |��t+|�r�t|t,�sJ�g} dgt/|d�z}!|D]�}"t1|	�rt|	t�sJ�|"|	z
}"|"t/|�dz
kDrt3d|"�d	t/|�dz
�d
���t5||"|!�\||"<}!|��lt7||"|�\}#}$| j9|#���d}%|r�|s�|��t|t�r|g}&nt|t,�sJ�|}&t|t,�sJ�t/|�t/|�krF|t/|�}'t;|'�D�(�)cgc]\}(})!|(s|(|&vr|)��}*}(})t=d�|*D��}%t+|�r�|�d}+n$t|t�rd|z}+ndt?|�z}+|%r|+dz
}+|+t/|�krbt|t,�sJ�|D]K},||+|,}-tA|+dzt/|��D]&}"||"|,dk(s||"|,�	|-||"|,<�||"|,}-�(�M	tC|fid
|�d|�d|�d|%�d|�d|�d|�d|	�d|
�d|�dd�d|
�d|�d|�d|�d|�d|�d|�d|�d|�|��}.|.jE|
� �||<| r&||jFjI| �||_#���|�t3d#��|r|S||Scc})}(w#tJ$rt)�||<Y���tL$r2}/|/jNd�d!|�d"�g|/jNdd��|/_'|/�d}/~/wwxYw)$NrHFTzReading sheet rhr�rz
header index z exceeds maximum index z	 of data.c3�2K�|]}|dk(xs|du���y�w)�NrX)�.0r�s  r\�	<genexpr>z(BaseExcelReader.parse.<locals>.<genexpr>Ms!����)W��1�!�r�'�*>�Q�$�Y�*>��s�r�r?r>r@�has_index_namesrBrErFrGrI�skip_blank_linesrMrNrOrPrQrRrSrArU)rHz	 (sheet: �)zSheet name is an empty list)(r)r0rd�listr��strrrr��dict�fromkeys�keys�printr�r�r�r�rzrhr-r#r"rr�r!rfr*r.�append�	enumerate�all�max�ranger/rv�columns�	set_namesrr}�args)0r~r[r>r?r@rArBrErFrGrHrIrLrMrNrOrPrQrRrSrU�kwds�ret_dict�sheets�output�last_sheetname�
asheetnamer��file_rows_neededrj�is_list_header�is_len_one_list_header�header_names�control_row�row�header_name�_r��index_col_list�potential_index_namesr�r��potential_data�offset�col�last�parser�errs0                                                r\rgzBaseExcelReader.parse�s���0	�F�#���%�(����j�$�'��F��H�
�
��%�%�F��H�
�
�C�
(� �\�F� �\�F��e�D��I�t�C�y�0�1�4��
�
�f�8M�8R�8R�8T�3U�V������ �J�'�N����z�l�3�4��*�c�*��.�.�z�:���/�/�
�;��#���v�y�(�E�R���&�&�u�.>�?�D��u�g�&����
�+�G�4�G��%.�[��z�"��"�N�%*�"��F�#�!�&�(�3�3�3�!%���v�;�!�#�-1�*�%��h�s�m�V�4�Q�7�� �L��!�l�6�&:�!�&�(�3�3�3�!��#�f�s�4��7�|�3��!�C�!�(�+�)�(�C�8�8�8��x����S��Y��]�*�(�+�C�5�0G�"�4�y�1�}�o�Y�8���
.<�D��I�{�-S�*�D��I�{� �,�)8��c��I�)N���Q�$�+�+�K�8�"�&$�O��&<��AV��i��-�&/�[�N�%�i��:�:�:�%.�N�"�&�(�3�3�3��v�;��T��*�,0��V��,=�)�%.�.C�$D�&�$D�D�A�q�*�1�~�!�>�2I��$D�#�&�
'*�)W��)W�&W�O��I�&��>��F����,���Z�F���V��_�F�
#��a�K�F��C��I�%�%�i��:�:�:�(��#�F�|�C�0��#(��!��S��Y�#?�C�#�C�y��~��3�t�C�y��~�7M�15��S�	�#��'+�C�y��~��	$@� )�'
�#�����"��(�	�
%4�� �
�!,��".��&�� ��(��&+��!,��!,��!,�� (�!�"$�#�$$�%�& *�'�($�)�*#0��-��2&,�[�[�u�[�%=��z�"��17�
�1C�1K�1K�1U�1U�$�2�F�:�&�.��W!�n�!��:�;�;���M��.�)�)��i&��L"�
1�%.�[��z�"��
�"�x�x��{�m�9�Z�L��B�R�S�X�X�a�b�\�R����	��
�s%�$Q�:BQ�R1�7R1�?-R,�,R1)NN)rT�StorageOptions | Nonerb�dict | Noner��None)r�ztype[_WorkbookT]�r�rk�r�r�)r�z	list[str])r�r�)r�r�rW)r��
int | None)r�r�r�r�)r�r�r�r�)rGrr�r�r�r�)
r>�int | Sequence[int] | Noner@r�rG�4Sequence[int] | int | Callable[[int], object] | NonerHr�r�r�)$r[�(str | int | list[int] | list[str] | Noner>r�r?�'SequenceNotStr[Hashable] | range | Noner@r�rB�DtypeArg | NonerE�Iterable[Hashable] | NonerFr�rGr�rHr�rLr�rM�list | dict | boolrN�Callable | lib.NoDefaultrO� dict[Hashable, str] | str | NonerP�
str | NonerQr�rRr�rSr�rU�DtypeBackend | lib.NoDefault)�__name__�
__module__�__qualname__�__annotations__r��propertyryr|rhr�r�r�r�r�r�r�r�r�
no_defaultrgrXr_r\rmrms���
��
26�%)�	"�/�"�#�	"�

�"�H�"��"�"���"��"�"�"�"��D������

�	�:>�*�>�.�>�G�	>�
�>�
�
>�D@A�-.�9=�04��!%�15�26�IM� ���*/�03���8<� $��"��69�n�n�+M*�<�M*�+�M*�7�	M*�
.�M*��M*�/�M*�0�M*�G�M*��M*��M*�(�M*�.�M*� 6�!M*�"�#M*�$�%M*�&�'M*�(�)M*�*4�+M*r_rmc��eZdZUdZded<ded<							d																	dd�ZdZedd��Zedd	��Z	edd
��Z
edd��Z				d									d d�Zd!d
�Z
							d																	d"d�Zedd��Zedd��Zedd��Zdd�Zd#d�Z		d$d�Zed%d��Zd&d�Z								d'd�Zd!d�Zy)(�ExcelWritera�
    Class for writing DataFrame objects into excel sheets.

    Default is to use:

    * `xlsxwriter <https://pypi.org/project/XlsxWriter/>`__ for xlsx files if xlsxwriter
      is installed otherwise `openpyxl <https://pypi.org/project/openpyxl/>`__
    * `odswriter <https://pypi.org/project/odswriter/>`__ for ods files

    See ``DataFrame.to_excel`` for typical usage.

    The writer should be used as a context manager. Otherwise, call `close()` to save
    and close any opened file handles.

    Parameters
    ----------
    path : str or typing.BinaryIO
        Path to xls or xlsx or ods file.
    engine : str (optional)
        Engine to use for writing. If None, defaults to
        ``io.excel.<extension>.writer``.  NOTE: can only be passed as a keyword
        argument.
    date_format : str, default None
        Format string for dates written into Excel files (e.g. 'YYYY-MM-DD').
    datetime_format : str, default None
        Format string for datetime objects written into Excel files.
        (e.g. 'YYYY-MM-DD HH:MM:SS').
    mode : {{'w', 'a'}}, default 'w'
        File mode to use (write or append). Append does not work with fsspec URLs.
    {storage_options}

    if_sheet_exists : {{'error', 'new', 'replace', 'overlay'}}, default 'error'
        How to behave when trying to write to a sheet that already
        exists (append mode only).

        * error: raise a ValueError.
        * new: Create a new sheet, with a name determined by the engine.
        * replace: Delete the contents of the sheet before writing to it.
        * overlay: Write contents to the existing sheet without first removing,
          but possibly over top of, the existing contents.

        .. versionadded:: 1.3.0

        .. versionchanged:: 1.4.0

           Added ``overlay`` option

    engine_kwargs : dict, optional
        Keyword arguments to be passed into the engine. These will be passed to
        the following functions of the respective engines:

        * xlsxwriter: ``xlsxwriter.Workbook(file, **engine_kwargs)``
        * openpyxl (write mode): ``openpyxl.Workbook(**engine_kwargs)``
        * openpyxl (append mode): ``openpyxl.load_workbook(file, **engine_kwargs)``
        * odswriter: ``odf.opendocument.OpenDocumentSpreadsheet(**engine_kwargs)``

        .. versionadded:: 1.3.0

    Notes
    -----
    For compatibility with CSV writers, ExcelWriter serializes lists
    and dicts to strings before writing.

    Examples
    --------
    Default usage:

    >>> df = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])  # doctest: +SKIP
    >>> with pd.ExcelWriter("path_to_file.xlsx") as writer:
    ...     df.to_excel(writer)  # doctest: +SKIP

    To write to separate sheets in a single file:

    >>> df1 = pd.DataFrame([["AAA", "BBB"]], columns=["Spam", "Egg"])  # doctest: +SKIP
    >>> df2 = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])  # doctest: +SKIP
    >>> with pd.ExcelWriter("path_to_file.xlsx") as writer:
    ...     df1.to_excel(writer, sheet_name="Sheet1")  # doctest: +SKIP
    ...     df2.to_excel(writer, sheet_name="Sheet2")  # doctest: +SKIP

    You can set the date format or datetime format:

    >>> from datetime import date, datetime  # doctest: +SKIP
    >>> df = pd.DataFrame(
    ...     [
    ...         [date(2014, 1, 31), date(1999, 9, 24)],
    ...         [datetime(1998, 5, 26, 23, 33, 4), datetime(2014, 2, 28, 13, 5, 13)],
    ...     ],
    ...     index=["Date", "Datetime"],
    ...     columns=["X", "Y"],
    ... )  # doctest: +SKIP
    >>> with pd.ExcelWriter(
    ...     "path_to_file.xlsx",
    ...     date_format="YYYY-MM-DD",
    ...     datetime_format="YYYY-MM-DD HH:MM:SS"
    ... ) as writer:
    ...     df.to_excel(writer)  # doctest: +SKIP

    You can also append to an existing Excel file:

    >>> with pd.ExcelWriter("path_to_file.xlsx", mode="a", engine="openpyxl") as writer:
    ...     df.to_excel(writer, sheet_name="Sheet3")  # doctest: +SKIP

    Here, the `if_sheet_exists` parameter can be set to replace a sheet if it
    already exists:

    >>> with ExcelWriter(
    ...     "path_to_file.xlsx",
    ...     mode="a",
    ...     engine="openpyxl",
    ...     if_sheet_exists="replace",
    ... ) as writer:
    ...     df.to_excel(writer, sheet_name="Sheet1")  # doctest: +SKIP

    You can also write multiple DataFrames to a single sheet. Note that the
    ``if_sheet_exists`` parameter needs to be set to ``overlay``:

    >>> with ExcelWriter("path_to_file.xlsx",
    ...     mode="a",
    ...     engine="openpyxl",
    ...     if_sheet_exists="overlay",
    ... ) as writer:
    ...     df1.to_excel(writer, sheet_name="Sheet1")
    ...     df2.to_excel(writer, sheet_name="Sheet1", startcol=3)  # doctest: +SKIP

    You can store Excel file in RAM:

    >>> import io
    >>> df = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])
    >>> buffer = io.BytesIO()
    >>> with pd.ExcelWriter(buffer) as writer:
    ...     df.to_excel(writer)

    You can pack Excel file into zip archive:

    >>> import zipfile  # doctest: +SKIP
    >>> df = pd.DataFrame([["ABC", "XYZ"]], columns=["Foo", "Bar"])  # doctest: +SKIP
    >>> with zipfile.ZipFile("path_to_file.zip", "w") as zf:
    ...     with zf.open("filename.xlsx", "w") as buffer:
    ...         with pd.ExcelWriter(buffer) as writer:
    ...             df.to_excel(writer)  # doctest: +SKIP

    You can specify additional arguments to the underlying engine:

    >>> with pd.ExcelWriter(
    ...     "path_to_file.xlsx",
    ...     engine="xlsxwriter",
    ...     engine_kwargs={{"options": {{"nan_inf_to_errors": True}}}}
    ... ) as writer:
    ...     df.to_excel(writer)  # doctest: +SKIP

    In append mode, ``engine_kwargs`` are passed through to
    openpyxl's ``load_workbook``:

    >>> with pd.ExcelWriter(
    ...     "path_to_file.xlsx",
    ...     engine="openpyxl",
    ...     mode="a",
    ...     engine_kwargs={{"keep_vba": True}}
    ... ) as writer:
    ...     df.to_excel(writer, sheet_name="Sheet2")  # doctest: +SKIP
    r��_engine�tuple[str, ...]�_supported_extensionsNc	��|tur�|�t|t�rk|dk(rft|t�r&tjj|�ddd}	nd}		t
jd|	�d�d��}|dk(r
t|	d	�
�}|�J�t|�}tj|�S#t$r}
td|	�d��|
�d}
~
wwxYw)
N�autor�r��xlsx�	io.excel.z.writerT��silent�writer��modezNo engine for filetype: '�')r�rdr��os�path�splitextr�
get_optionr+�KeyErrorrfr,�object�__new__)�clsrrCrO�datetime_formatr�rT�if_sheet_existsrb�extr�s           r\rzExcelWriter.__new__\s����+���~�*�V�S�"9�f��>N��d�C�(��'�'�*�*�4�0��4�Q�R�8�C� �C�R�#�.�.��3�%�w�/G�PT�U�F���'�!3�C�h�!G��
�%�%�%��V�$�C��~�~�c�"�"�� �R�$�'@���Q�%G�H�c�Q��R�s�-B*�*	C�3C�Cc��|jS)z'Extensions that writer engine supports.)r�r�s r\�supported_extensionsz ExcelWriter.supported_extensions�s���)�)�)r_c��|jS)zName of engine.)r�r�s r\rCzExcelWriter.engine�s���|�|�r_c��t�)z(Mapping of sheet names to sheet objects.r�r�s r\r�zExcelWriter.sheets�s
��"�!r_c��t�)z�
        Book instance. Class type will depend on the engine used.

        This attribute can be used to access engine-specific features.
        r�r�s r\rnzExcelWriter.book�s
��"�!r_c��t�)a
        Write given formatted cells into Excel an excel sheet

        Parameters
        ----------
        cells : generator
            cell of formatted data to save to Excel sheet
        sheet_name : str, default None
            Name of Excel sheet, if None, then use self.cur_sheet
        startrow : upper left cell row to dump data frame
        startcol : upper left cell column to dump data frame
        freeze_panes: int tuple of length 2
            contains the bottom-most row and right-most column to freeze
        r�)r~�cellsr[�startrow�startcol�freeze_paness      r\�_write_cellszExcelWriter._write_cells�s
��,"�!r_c��t�)z(
        Save workbook to disk.
        r�r�s r\�_savezExcelWriter._save�s
��"�!r_c	�&�t|t�r3tjj	|�d}	|j|	�d|vr|dz
}|j
dd�}|dvrtd|�d���|rd|vrtd��|�d	}||_tttt|�d
di��|_
t|t�st|||d�
�|_
d|_|�d|_n||_|�d|_||_y||_||_y)Nr��b�azr+)N�error�new�replace�overlayr�z^' is not valid for if_sheet_exists. Valid options are 'error', 'new', 'replace' and 'overlay'.z7if_sheet_exists is only valid in append mode (mode='a')rrr)rrFrtz
YYYY-MM-DDzYYYY-MM-DD HH:MM:SS)rdr�rrr�check_extensionrrf�_if_sheet_existsr&rrrw�_handlesr�r'�
_cur_sheet�_date_format�_datetime_format�_mode)
r~rrCrOrr�rTr	rbr
s
          r\r�zExcelWriter.__init__�s9���d�C� ��'�'�"�"�4�(��,�C�� � ��%��d�?��C�K�D��|�|�C��&���"N�N���O�$�%M�M��
��t�4�/��V�W�W��"�%�O� /���"���E��D�!�
�t�/D�
��
��$��,�&��d�O�U��D�M������ ,�D�� +�D���"�$9�D�!���
�%4�D�!���
r_c��|jS�zW
        Format string for dates written into Excel files (e.g. 'YYYY-MM-DD').
        )r#r�s r\rOzExcelWriter.date_format�s��
� � � r_c��|jSr')r$r�s r\rzExcelWriter.datetime_format����
�$�$�$r_c��|jS)z[
        How to behave when writing to a sheet that already exists in append mode.
        )r r�s r\r	zExcelWriter.if_sheet_exists�r)r_c�D�t|jjdd�S)Nr�r�)�getattrr!rqr�s r\�
__fspath__zExcelWriter.__fspath__s���t�}�}�+�+�V�R�8�8r_c�<�|�|j}|�td��|S)Nz8Must pass explicit sheet_name or set _cur_sheet property)r"rf)r~r[s  r\�_get_sheet_namezExcelWriter._get_sheet_names)�������J����W�X�X��r_c���d}t|�rt|�}||fSt|�rt|�}||fSt	|�rt|�}||fSt
|tj�r|j}||fSt
|tj�r|j}||fSt
|tj�r|j�dz}d}||fSt|�}||fS)aG
        Convert numpy types to Python types for the Excel writers.

        Parameters
        ----------
        val : object
            Value to be written into cells

        Returns
        -------
        Tuple with the first element being the converted value and the second
            being an optional format
        Ni�Q�0)r!r�r �floatrr�rd�datetimer$�dater#�	timedelta�
total_secondsr�)r~�val�fmts   r\�_value_with_fmtzExcelWriter._value_with_fmt
s���$���c�?��c�(�C��C�x���c�]���*�C��C�x���S�\��s�)�C��C�x����X�.�.�
/��'�'�C��C�x����X�]�]�
+��#�#�C��C�x��
��X�/�/�
0��#�#�%��-�C��C��C�x���c�(�C��C�x�r_c����jd�r�dd�t�fd�|jD��std|j�d��d���y)	z�
        checks that path's extension against the Writer's supported
        extensions.  If it isn't supported, raises UnsupportedFiletypeError.
        rar�Nc3�&�K�|]}�|v���
y�wrWrX)r��	extensionr
s  �r\r�z.ExcelWriter.check_extension.<locals>.<genexpr>;s�����O�5N�	�3�)�#�5N�s�zInvalid extension for engine 'z': 'r�T)�
startswith�anyr�rfrC)rr
s `r\rzExcelWriter.check_extension3sS����>�>�#���a�b�'�C��O�S�5N�5N�O�O��=�c�j�j�\��c�U�RS�T�U�U�r_c��|SrWrXr�s r\�	__enter__zExcelWriter.__enter__@����r_c�$�|j�yrW�rh�r~�exc_type�	exc_value�	tracebacks    r\�__exit__zExcelWriter.__exit__C�
��	
�
�
�r_c�X�|j�|jj�y)z+synonym for save, to make it more file-likeN)rr!rhr�s r\rhzExcelWriter.closeKs���
�
���
�
���r_)NNN�wNNN)r�)FilePath | WriteExcelBuffer | ExcelWriterrCr�rOr�rr�r�r�rTr�r	�ExcelWriterIfSheetExists | Nonerbr�r�r8)r�r�)r�r�)r�zdict[str, Any]r�)NrrN)
r[r�rr�rr�rztuple[int, int] | Noner�r�r�)rrLrCr�rOr�rr�r�r�rTr�r	rMrbzdict[str, Any] | Noner�r�)r[r�r�r�)r�zOtuple[int | float | bool | str | datetime.datetime | datetime.date, str | None])r
r�r�z
Literal[True]�r�r8�rEztype[BaseException] | NonerFzBaseException | NonerGzTracebackType | Noner�r�)r�r�r��__doc__r�r�_pathr�rrCr�rnrrr�rOrr	r-r/r9�classmethodrr@rHrhrXr_r\r�r��s>��`�p�L�*�*�
"�"&�&*��15�;?�%)� #�7� #�� #� �	 #�
$� #��
 #�/� #�9� #�#� #�
� #�F
�E�
�*��*������"��"��"��"�"&���/3�
"��"��	"�
�"�-�
"�
�"�0"�"�"&�&*��15�;?�/3�5�7�5��5� �	5�
$�5��
5�/�5�9�5�-�5�
�5�n�!��!��%��%��%��%�9��$�
�$�L�	��	���,��(��(�	�

��r_r�)s	s	s	s��ࡱ�sPKc	���t|t�rt|�}t|d|d��5}|j}|jd�|j
t�}|�td��t|t�sJ�|�|jd�t�fd�tD��r
	ddd�y�jt�s
	ddd�ytj|�5}|j�D�cgc]"}|j!d	d
�j#���$}}ddd�dvr
	ddd�yd
|vr
	ddd�yd|vr
	ddd�y	ddd�ycc}w#1swY�BxYw#1swYyxYw)a8
    Inspect the path or content of an excel file and get its format.

    Adopted from xlrd: https://github.com/python-excel/xlrd.

    Parameters
    ----------
    content_or_path : str or file-like object
        Path to file or content of file to inspect. May be a URL.
    {storage_options}

    Returns
    -------
    str or None
        Format of file if it can be determined.

    Raises
    ------
    ValueError
        If resulting stream is empty.
    BadZipFile
        If resulting stream does not have an XLS signature and is not a valid zipfile.
    rsFrtrNzstream is emptyc3�@�K�|]}�j|����y�wrW)r=)r��sig�peeks  �r\r�z'inspect_excel_format.<locals>.<genexpr>�s�����>�~��t���s�#�~�s��xls�\�/zxl/workbook.xmlr�zxl/workbook.bin�xlsbzcontent.xml�ods�zip)rdrwr	r'rqr{rv�	PEEK_SIZErfr>�XLS_SIGNATURESr=�
ZIP_SIGNATURE�zipfile�ZipFile�namelistr�lower)	�content_or_pathrTrq�stream�buf�zfr��component_namesrVs	        @r\�inspect_excel_formatri[sp���8�/�5�)�!�/�2��	�����
�	��������A���k�k�)�$���;��.�/�/��#�u�%�%�%������A���>�~�>�>��
�
�����/��
�
�"�_�_�V�
$��=?�K�K�M��<I�D����T�3�'�-�-�/�M�
��%���/��3
�
�4��/��7
�
�8�O�+��;
�
�<�=
�
��(�%�
$��#
�
�sT�A>E0�3E0�E0�'E$�:'E�!E$�#
E0�9E0�E0�E0�E$�$E-	�)E0�0E9c�h�eZdZUdZddlmZddlmZddlm	Z	ddl
mZddlm
Z
e
e	eeed�Zd	ed
<			d							dd�Zd
�Zddddddddddddej&ddddej&f																															dd�Zed��Zed��Zdd�Zdd�Z								dd�Zy)reai	
    Class for parsing tabular Excel sheets into DataFrame objects.

    See read_excel for more documentation.

    Parameters
    ----------
    path_or_buffer : str, bytes, path object (pathlib.Path or py._path.local.LocalPath),
        A file-like object, xlrd workbook or openpyxl workbook.
        If a string or path object, expected to be a path to a
        .xls, .xlsx, .xlsb, .xlsm, .odf, .ods, or .odt file.
    engine : str, default None
        If io is not a buffer or path, this must be set to identify io.
        Supported engines: ``xlrd``, ``openpyxl``, ``odf``, ``pyxlsb``, ``calamine``
        Engine compatibility :

        - ``xlrd`` supports old-style Excel files (.xls).
        - ``openpyxl`` supports newer Excel file formats.
        - ``odf`` supports OpenDocument file formats (.odf, .ods, .odt).
        - ``pyxlsb`` supports Binary Excel files.
        - ``calamine`` supports Excel (.xls, .xlsx, .xlsm, .xlsb)
          and OpenDocument (.ods) file formats.

        .. versionchanged:: 1.2.0

           The engine `xlrd <https://xlrd.readthedocs.io/en/latest/>`_
           now only supports old-style ``.xls`` files.
           When ``engine=None``, the following logic will be
           used to determine the engine:

           - If ``path_or_buffer`` is an OpenDocument format (.odf, .ods, .odt),
             then `odf <https://pypi.org/project/odfpy/>`_ will be used.
           - Otherwise if ``path_or_buffer`` is an xls format,
             ``xlrd`` will be used.
           - Otherwise if ``path_or_buffer`` is in xlsb format,
             `pyxlsb <https://pypi.org/project/pyxlsb/>`_ will be used.

           .. versionadded:: 1.3.0

           - Otherwise if `openpyxl <https://pypi.org/project/openpyxl/>`_ is installed,
             then ``openpyxl`` will be used.
           - Otherwise if ``xlrd >= 2.0`` is installed, a ``ValueError`` will be raised.

           .. warning::

            Please do not report issues when using ``xlrd`` to read ``.xlsx`` files.
            This is not supported, switch to using ``openpyxl`` instead.
    engine_kwargs : dict, optional
        Arbitrary keyword arguments passed to excel engine.

    Examples
    --------
    >>> file = pd.ExcelFile('myfile.xlsx')  # doctest: +SKIP
    >>> with pd.ExcelFile("myfile.xls") as xls:  # doctest: +SKIP
    ...     df1 = pd.read_excel(xls, "Sheet1")  # doctest: +SKIP
    r)�CalamineReader)�	ODFReader)�OpenpyxlReader)�PyxlsbReader)�
XlrdReader)�xlrd�openpyxl�odf�pyxlsb�calaminezMapping[str, Any]�_enginesNc�~�|�i}|�||jvrtd|����t|t�r/t	|�}tjdtt���||_	t|�|_tdd���d}nddl
}tt|��}|�b|�t|j �rd}nt#||�	�}|�td
��t%j&d|�d�d
��}|dk(r
t)|d��}|�J�||_||_|j||j||��|_y)NzUnknown engine: z�Passing bytes to 'read_excel' is deprecated and will be removed in a future version. To read from a byte string, wrap it in a `BytesIO` object.)�
stacklevelrp�ignore)�errorsrrW)rdrTzLExcel file format cannot be determined, you must specify an engine manually.r�z.readerTr�r��readerr�)rTrb)rurfrdrwr	�warnings�warn�
FutureWarningrrZr(�_iorrpr%r�Bookrirrr+rCrT�_reader)r~�path_or_bufferrCrTrb�xlrd_versionrpr
s        r\r�zExcelFile.__init__�sW��� ��M���&��
�
�"=��/��x�8�9�9��n�e�,�$�^�4�N��M�M�>��+�-�
�!���!�.�1���&�f�X�>�F��L��"�;�t�#4�5�L��>��'�J�~�t�y�y�,Q���*�$2�O����;�$�.���
�&�&��3�%�w�'?��M�F����+�C�h�?���!�!�!����.���,�t�}�}�V�,��H�H�+�'�
��r_c��|jSrW)r~r�s r\r-zExcelFile.__fspath__%s���x�x�r_Fc��|jjdid|�d|�d|�d|�d|�d|�d|�d|�d	|	�d
|
�d|�d|�d
|
�d|�d|�d|�d|�d|�|��S)aO
        Parse specified sheet(s) into a DataFrame.

        Equivalent to read_excel(ExcelFile, ...)  See the read_excel
        docstring for more info on accepted parameters.

        Returns
        -------
        DataFrame or dict of DataFrames
            DataFrame from the passed in Excel file.

        Examples
        --------
        >>> df = pd.DataFrame([[1, 2, 3], [4, 5, 6]], columns=['A', 'B', 'C'])
        >>> df.to_excel('myfile.xlsx')  # doctest: +SKIP
        >>> file = pd.ExcelFile('myfile.xlsx')  # doctest: +SKIP
        >>> file.parse()  # doctest: +SKIP
        r[r>r?r@rArDrErFrGrHrIrMrNrOrPrRrSrUrX)r�rg)r~r[r>r?r@rArDrErFrGrHrIrMrNrOrPrRrSrUr�s                    r\rgzExcelFile.parse(s���P"�t�|�|�!�!�
�!�
��
��
� �	
�
�
�"�

�$�
�&�
��
��
� �
�$�
�$�
�$�
� �
� �!
�""�#
�$(��'
�	
r_c�.�|jjSrW)r�rnr�s r\rnzExcelFile.bookfs���|�|� � � r_c�.�|jjSrW)r�r�r�s r\r�zExcelFile.sheet_namesjs���|�|�'�'�'r_c�8�|jj�y)zclose io if necessaryN)r�rhr�s r\rhzExcelFile.closens�������r_c��|SrWrXr�s r\r@zExcelFile.__enter__rrAr_c�$�|j�yrWrCrDs    r\rHzExcelFile.__exit__urIr_)NNN)rCr�rTr�rbr�r�r�) r[r�r>r�r?r�r@r�rEr�rFr�rGr�rHr�rMr�rNr�rOz str | dict[Hashable, str] | NonerPr�rRr�rSr�rUr�r�z7DataFrame | dict[str, DataFrame] | dict[int, DataFrame]r�rNrO)r�r�r�rP�pandas.io.excel._calaminerk�pandas.io.excel._odfreaderrl�pandas.io.excel._openpyxlrm�pandas.io.excel._pyxlsbrn�pandas.io.excel._xlrdrorur�r�r-rr�rgr�rnr�rhr@rHrXr_r\rere�s���7�r9�4�8�4�0��"���"�#�H���"�15�%)�@
��@
�/�	@
�
#�@
�
�
@
�D�
@A�-.�9=�04���15�26�IM� ��*/�03���8<� $�"��69�n�n�'<
�<�<
�+�<
�7�	<
�
.�<
�/�<
�0�<
�G�<
��<
�(�<
�.�<
�6�<
� �!<
�"�#<
�$�%<
�&4�'<
�*
A�+<
�|�!��!��(��(����,��(��(�	�

�r_re).)2r[z	str | intr>r�r?r�r@� int | str | Sequence[int] | NonerA�Hint | str | Sequence[int] | Sequence[str] | Callable[[str], bool] | NonerBr�rC�?Literal['xlrd', 'openpyxl', 'odf', 'pyxlsb', 'calamine'] | NonerD�0dict[str, Callable] | dict[int, Callable] | NonerEr�rFr�rGr�rHr�rJr�rKr�rLr�rMr�rNr�rOr�rPr�rQr�rRr�rSr�rTr:rUr�r�r#)2r[zlist[IntStrT] | Noner>r�r?r�r@r�rAr�rBr�rCr�rDr�rEr�rFr�rGr�rHr�rJr�rKr�rLr�rMr�rNr�rOr�rPr�rQr�rRr�rSr�rTr:rUr�r�zdict[IntStrT, DataFrame])r)4r[z str | int | list[IntStrT] | Noner>r�r?r�r@r�rAr�rBr�rCr�rDr�rEr�rFr�rGr�rHr�rJr�rKr�rLr�rMr�rNr�rOr�rPr�rQr�rRr�rSr�rTr�rUr�rbr�r�z$DataFrame | dict[IntStrT, DataFrame]rW)rdzFilePath | ReadBuffer[bytes]rTr�r�r�)e�
__future__r�collections.abcrrrrr3�	functoolsrrZr	r�textwrapr
�typingrrr
rrrrrrrr{r`�pandas._configr�pandas._libsr�pandas._libs.parsersr�pandas.compat._optionalrr�
pandas.errorsr�pandas.util._decoratorsrr�pandas.util._exceptionsr�pandas.util._validatorsr�pandas.core.dtypes.commonrr r!r"�pandas.core.framer#�pandas.core.shared_docsr$�pandas.util.versionr%�pandas.io.commonr&r'r(r)�pandas.io.excel._utilr*r+r,r-r.�pandas.io.parsersr/�pandas.io.parsers.readersr0�typesr1�pandas._typingr2r3r4r5r6r7r8r9r:r;�join�sorted�_read_excel_docr]r�rkrmr�r^r_r��mapr�r]rirerXr_r\�<module>r�s+��"������	�������!��.��)��5�7���(�0�'�����)�6��#����q�d�6�;�;�v�m�,�-�r�V�L�erM�ff�gY��|
� �#�
*-�58�25�� �NQ�CF�-0�.1�EH������&)�,/�47�����&)�25�C#��#�

'�#�3�
#�0�#��#��#�
L�#� A�!#�"+�##�$,�%#�&C�'#�(�)#�,�-#�.�/#�0�1#�2$�3#�4*�5#�62�7#�8�9#�:�;#�<�=#�>�?#�@$�A#�B0�C#�D�E#�
�#�L
�*-�58�25�� �NQ�CF�-0�.1�EH������&)�,/�47�����&)�25�C#�%�#�

'�#�3�
#�0�#��#��#�
L�#� A�!#�"+�##�$,�%#�&C�'#�(�)#�,�-#�.�/#�0�1#�2$�3#�4*�5#�62�7#�8�9#�:�;#�<�=#�>�?#�@$�A#�B0�C#�D�E#�
�#�L�\�"3�4�5�	�/��45�T�*+�59�26��!�NR�CG�-1�.2�EI��� ���&+�,/�N�N�48� ����-1�25�.�.�!%�CT�0�T�
'�	T�
3�T�0�
T��T��T�
L�T�A�T� +�!T�",�#T�$C�%T�&�'T�*�+T�,�-T�.�/T�0$�1T�2*�3T�42�5T�6�7T�8�9T�:�;T�<�=T�>+�?T�@0�AT�B�CT�D*�ET��6�T�n�\�
"�
�}*�g�j�)�}*�@�\�"3�4�5�n�'�*�%�n�6�n�b
���
���C��=�*:�:�;�<�	��\�"3�4�5�.2�<�1�<�*�<��<�6�<�~`�`r_

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