Skip to content

Commit 11742fb

Browse files
committed
Merge pull request #4154 from davidshinn/improve_excel_docs
DOC: Improve excel docs
2 parents 015e926 + 1c6440e commit 11742fb

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

doc/source/io.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,8 @@ any pickled pandas object (or any other pickled object) from file:
14951495
Excel files
14961496
-----------
14971497

1498-
The ``read_excel`` method can read an Excel 2003 file using the ``xlrd`` Python
1498+
The ``read_excel`` method can read Excel 2003 (``.xls``) and
1499+
Excel 2007 (``.xlsx``) files using the ``xlrd`` Python
14991500
module and use the same parsing code as the above to convert tabular data into
15001501
a DataFrame. See the :ref:`cookbook<cookbook.excel>` for some
15011502
advanced strategies
@@ -1517,9 +1518,6 @@ advanced strategies
15171518
15181519
read_excel('path_to_file.xls', 'Sheet1', index_col=None, na_values=['NA'])
15191520
1520-
To read sheets from an Excel 2007 file, you can pass a filename with a ``.xlsx``
1521-
extension, in which case the ``openpyxl`` module will be used to read the file.
1522-
15231521
It is often the case that users will insert columns to do temporary computations
15241522
in Excel and you may not want to read in those columns. `read_excel` takes
15251523
a `parse_cols` keyword to allow you to specify a subset of columns to parse.

pandas/io/excel.py

+10
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ def read_excel(path_or_buf, sheetname, kind=None, **kwds):
3737
column ranges (e.g. "A:E" or "A,C,E:F")
3838
na_values : list-like, default None
3939
List of additional strings to recognize as NA/NaN
40+
keep_default_na : bool, default True
41+
If na_values are specified and keep_default_na is False the default NaN
42+
values are overridden, otherwise they're appended to
43+
verbose : boolean, default False
44+
Indicate number of NA values placed in non-numeric columns
4045
4146
Returns
4247
-------
@@ -101,6 +106,11 @@ def parse(self, sheetname, header=0, skiprows=None, skip_footer=0,
101106
column ranges (e.g. "A:E" or "A,C,E:F")
102107
na_values : list-like, default None
103108
List of additional strings to recognize as NA/NaN
109+
keep_default_na : bool, default True
110+
If na_values are specified and keep_default_na is False the default NaN
111+
values are overridden, otherwise they're appended to
112+
verbose : boolean, default False
113+
Indicate number of NA values placed in non-numeric columns
104114
105115
Returns
106116
-------

0 commit comments

Comments
 (0)