pandas.ExcelFile.parse
pandas 3.1.1 · Input and output · method
Read worksheets from an open ExcelFile. This method is deprecated in pandas 3.1.1. Use read_excel with the open workbook instead.
Call syntax
ExcelFile.parse(…) Full signature
ExcelFile.parse(
sheet_name=0,
header=0,
names=None,
index_col=None,
usecols=None,
converters=None,
true_values=None,
false_values=None,
skiprows=None,
nrows=None,
na_values=None,
parse_dates=False,
date_format=None,
thousands=None,
comment=None,
skipfooter=0,
dtype_backend=…,
**kwds,
)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
sheet_name |
Optional Positional or keyword Default 0 |
str, int, list, or None Choose worksheets by name or zero-based position. None requests every sheet where supported. |
header |
Optional Positional or keyword Default 0 |
int, list of int Define which row or rows provide column names, or control whether to write them. |
names |
Optional Positional or keyword Default None |
array-like Supply explicit names for labels, fields, or levels. |
index_col |
Optional Positional or keyword Default None |
int, str, list of int Identify the column or columns whose values should become the row index. |
usecols |
Optional Positional or keyword Default None |
str, list-like, or callable Select a subset of source columns by name, position, or a callable. |
converters |
Optional Positional or keyword Default None |
dict Map column labels or positions to conversion functions. |
true_values |
Optional Positional or keyword Default None |
list Add source values that should become boolean True. |
false_values |
Optional Positional or keyword Default None |
list Add source values that should become boolean False. |
skiprows |
Optional Positional or keyword Default None |
list-like, int, or callable Skip selected input rows before creating the DataFrame. |
nrows |
Optional Positional or keyword Default None |
int Limit the number of rows to read or display. |
na_values |
Optional Positional or keyword Default None |
scalar, str, list-like, or dict Add input markers that should be interpreted as missing. |
parse_dates |
Optional Positional or keyword Default False |
bool, list-like, or dict Choose whether to interpret selected fields as dates during a read. |
date_format |
Optional Positional or keyword Default None |
str or dict of column -> format Specify datetime parsing or formatting directives such as "%Y-%m-%d". |
thousands |
Optional Positional or keyword Default None |
str Identify the character separating groups of digits. |
comment |
Optional Positional or keyword Default None |
str Identify the comment character used when parsing text. |
skipfooter |
Optional Positional or keyword Default 0 |
int Skip this many lines at the end of the input. |
dtype_backend |
Optional Positional or keyword |
{'numpy_nullable', 'pyarrow'} Choose nullable NumPy-backed dtypes or Arrow-backed dtypes. |
**kwds |
Optional Additional keyword arguments |
Returns
DataFrame or dict of DataFrames