Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add table name parameter to pandas.read_excel #58500

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 16 additions & 4 deletions doc/source/whatsnew/v3.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,22 @@ including other versions of pandas.
Enhancements
~~~~~~~~~~~~

.. _whatsnew_300.enhancements.enhancement1:

enhancement1
^^^^^^^^^^^^
.. _whatsnew_300.enhancements.read_excel_table_parameter:

``Addition of table name parameter in pandas read_excel``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Previously, when using pandas :func:`read_excel`` method the data read from Excel could not be selected in more detail than on the sheet level.
To distinguish data that is part of a particular table in the Excel file could be tedious without the use of third party API's.
This enhancement is a solution to `Issue #38937 <https://github.com/pandas-dev/pandas/issues/38937>`__ introduces the ability to specify a table_name parameter that corresponds to the name of a table in the specified Excel file.
The table_name argument accepts the names as a string, a list of strings, or the value of None which corresponds to reading in every table in that file.

The return format has some changes, but only if a table_name parameter is specified. If it is not specified, the return remains a DataFrame or dictionary of DataFrames
holding the data from each sheet.
- If a table_name is specified and a sheet_name is not, the return will be a DataFrame or dictionary of DataFrames holding the table data desired
- If a table_name is specified and a sheet_name is also specified, the return with be a nested dictionary containing 2 dictionaries:
- The first dictionary is a dictionary of DataFrames corresponding to the data on each sheet
- The second dictionary is a dictionary of DataFrames corresponding to the data in each table

.. _whatsnew_300.enhancements.enhancement2:

Expand Down