Skip to content

Commit 9e46790

Browse files
committed
Changes referenced in PR review comments from @rhshadrach
1 parent 71babd9 commit 9e46790

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

pandas/io/excel/_base.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
)
8080
_read_excel_doc = (
8181
"""
82-
Read an Excel file into a ``pandas`` ``DataFrame``.
82+
Read an Excel file into a ``pandas`` DataFrame.
8383
8484
Supports `xls`, `xlsx`, `xlsm`, `xlsb`, `odf`, `ods` and `odt` file extensions
8585
read from a local filesystem or URL. Supports an option to read
@@ -105,22 +105,22 @@
105105
106106
Available cases:
107107
108-
* Defaults to ``0``: 1st sheet as a ``DataFrame``
109-
* ``1``: 2nd sheet as a ``DataFrame``
108+
* Defaults to ``0``: 1st sheet as a DataFrame
109+
* ``1``: 2nd sheet as a DataFrame
110110
* ``"Sheet1"``: Load sheet with name "Sheet1"
111111
* ``[0, 1, "Sheet5"]``: Load first, second and sheet named "Sheet5"
112-
as a dict of ``DataFrame``
112+
as a dict of DataFrame
113113
* ``None``: All worksheets.
114114
115115
header : int, list of int, default 0
116116
Row (0-indexed) to use for the column labels of the parsed
117-
``DataFrame``. If a list of integers is passed those row positions will
117+
DataFrame. If a list of integers is passed those row positions will
118118
be combined into a ``MultiIndex``. Use ``None`` if there is no header.
119119
names : array-like, default None
120120
List of column names to use. If file contains no header row,
121121
then you should explicitly pass ``header=None``.
122122
index_col : int, str, list of int, default None
123-
Column (0-indexed) to use as the row labels of the ``DataFrame``.
123+
Column (0-indexed) to use as the row labels of the DataFrame.
124124
Pass None if there is no such column. If a list is passed,
125125
those columns will be combined into a ``MultiIndex``. If a
126126
subset of data is selected with ``usecols``, ``index_col``
@@ -143,7 +143,7 @@
143143
144144
Returns a subset of the columns according to behavior above.
145145
dtype : Type name or dict of column -> type, default None
146-
Data type for data or columns. E.g. ``{'a': np.float64, 'b': np.int32}``
146+
Data type for data or columns. E.g. ``{{'a': np.float64, 'b': np.int32}}``
147147
Use `object` to preserve data as stored in Excel and not interpret dtype.
148148
If converters are specified, they will be applied INSTEAD
149149
of ``dtype`` conversion.
@@ -152,10 +152,10 @@
152152
Supported engines: ``"xlrd"``, ``"openpyxl"``, ``"odf"``, ``"pyxlsb"``.
153153
Engine compatibility :
154154
155-
- ``"xlrd"`` supports old-style Excel files (.xls).
156-
- ``"openpyxl"`` supports newer Excel file formats.
157-
- ``"odf"`` supports OpenDocument file formats (.odf, .ods, .odt).
158-
- ``"pyxlsb"`` supports Binary Excel files.
155+
- ``xlrd`` supports old-style Excel files (.xls).
156+
- ``openpyxl`` supports newer Excel file formats.
157+
- ``odf`` supports OpenDocument file formats (.odf, .ods, .odt).
158+
- ``pyxlsb`` supports Binary Excel files.
159159
160160
.. versionchanged:: 1.2.0
161161
The engine `xlrd <https://xlrd.readthedocs.io/en/latest/>`_
@@ -215,7 +215,7 @@
215215
``na_values`` parameters will be ignored.
216216
na_filter : bool, default True
217217
Detect missing value markers (empty strings and the value of ``na_values``). In
218-
data without any NAs, ``passing na_filter=False`` can improve the performance
218+
data without any NAs, passing ``na_filter=False`` can improve the performance
219219
of reading a large file.
220220
verbose : bool, default False
221221
Indicate number of NA values placed in non-numeric columns.
@@ -233,7 +233,7 @@
233233
If a column or index contains an unparsable date, the entire column or
234234
index will be returned unaltered as an object data type. If you don`t want to
235235
parse some cells as date, just change their type in Excel to "Text".
236-
For non-standard ``datetime`` parsing, use ``pd.to_datetime`` after ``pd.read_excel``.
236+
For non-standard datetime parsing, use ``pd.to_datetime`` after ``pd.read_excel``.
237237
238238
Note: A fast-path exists for iso8601-formatted dates.
239239
date_parser : function, optional
@@ -279,8 +279,8 @@
279279
280280
.. versionadded:: 1.2.0
281281
282-
dtype_backend : {{"numpy_nullable", "pyarrow"}}, defaults to ``numpy`` backed ``DataFrames``
283-
Which ``dtype_backend`` to use, e.g. whether a ``DataFrame`` should have ``numpy``
282+
dtype_backend : {{"numpy_nullable", "pyarrow"}}, defaults to NumPy backed ``DataFrames``
283+
Which ``dtype_backend`` to use, e.g. whether a DataFrame should have NumPy
284284
arrays, nullable ``dtypes`` are used for all ``dtypes`` that have a nullable
285285
implementation when ``"numpy_nullable"`` is set, ``pyarrow`` is used for all
286286
dtypes if ``"pyarrow"`` is set.
@@ -295,15 +295,15 @@
295295
Returns
296296
-------
297297
DataFrame or dict of DataFrames
298-
``DataFrame`` from the passed in Excel file. See notes in ``sheet_name``
298+
DataFrame from the passed in Excel file. See notes in ``sheet_name``
299299
argument for more information on when a ``dict`` of ``DataFrames`` is returned.
300300
301301
See Also
302302
--------
303-
DataFrame.to_excel : Write ``DataFrame`` to an Excel file.
304-
DataFrame.to_csv : Write ``DataFrame`` to a comma-separated values (csv) file.
305-
read_csv : Read a comma-separated values (csv) file into ``DataFrame``.
306-
read_fwf : Read a table of fixed-width formatted lines into ``DataFrame``.
303+
DataFrame.to_excel : Write DataFrame to an Excel file.
304+
DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file.
305+
read_csv : Read a comma-separated values (csv) file into DataFrame.
306+
read_fwf : Read a table of fixed-width formatted lines into DataFrame.
307307
308308
Notes
309309
-----
@@ -345,7 +345,7 @@
345345
1 string2 2.0
346346
2 #Comment 3.0
347347
348-
``True``, ``False``, ``NaN`` values, and thousands of separators have defaults,
348+
True, False, NA values, and thousands of separators have defaults,
349349
but can be explicitly specified, too. Supply the values you would like
350350
as strings or lists of strings!
351351
@@ -356,7 +356,7 @@
356356
1 NaN 2
357357
2 #Comment 3
358358
359-
Comment lines in the excel input file can be skipped using the ``comment`` ``kwarg``
359+
Comment lines in the excel input file can be skipped using the ``comment`` keyword argument
360360
361361
>>> pd.read_excel('tmp.xlsx', index_col=0, comment='#') # doctest: +SKIP
362362
Name Value

0 commit comments

Comments
 (0)