Skip to content

Commit 5a0bfad

Browse files
committed
DOC: minor updates to v0.16.0
1 parent 4e563ea commit 5a0bfad

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

doc/source/io.rst

+11-10
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ take full advantage of the flexibility of the date parsing API:
573573
date_parser=conv.parse_date_time)
574574
df
575575
576-
Pandas will try to call the ``date_parser`` function in three different ways. If
576+
Pandas will try to call the ``date_parser`` function in three different ways. If
577577
an exception is raised, the next one is tried:
578578

579579
1. ``date_parser`` is first called with one or more arrays as arguments,
@@ -593,7 +593,7 @@ Note that performance-wise, you should try these methods of parsing dates in ord
593593

594594
2. If you know the format, use ``pd.to_datetime()``:
595595
``date_parser=lambda x: pd.to_datetime(x, format=...)``
596-
596+
597597
3. If you have a really non-standard format, use a custom ``date_parser`` function.
598598
For optimal performance, this should be vectorized, i.e., it should accept arrays
599599
as arguments.
@@ -1965,13 +1965,13 @@ respectively.
19651965
.. versionadded:: 0.12
19661966

19671967
``ExcelFile`` has been moved to the top level namespace.
1968-
1968+
19691969
There are two approaches to reading an excel file. The ``read_excel`` function
19701970
and the ``ExcelFile`` class. ``read_excel`` is for reading one file
19711971
with file-specific arguments (ie. identical data formats across sheets).
19721972
``ExcelFile`` is for reading one file with sheet-specific arguments (ie. various data
19731973
formats across sheets). Choosing the approach is largely a question of
1974-
code readability and execution speed.
1974+
code readability and execution speed.
19751975

19761976
Equivalent class and function approaches to read a single sheet:
19771977

@@ -1993,12 +1993,13 @@ Equivalent class and function approaches to read multiple sheets:
19931993
xls = pd.ExcelFile('path_to_file.xls')
19941994
data['Sheet1'] = xls.parse('Sheet1', index_col=None, na_values=['NA'])
19951995
data['Sheet2'] = xls.parse('Sheet2', index_col=1)
1996-
1996+
19971997
# For when Sheet1's format is identical to Sheet2
19981998
data = read_excel('path_to_file.xls', ['Sheet1','Sheet2'], index_col=None, na_values=['NA'])
1999-
2000-
Specifying Sheets
1999+
2000+
Specifying Sheets
20012001
+++++++++++++++++
2002+
20022003
.. _io.specifying_sheets:
20032004

20042005
.. note :: The second argument is ``sheetname``, not to be confused with ``ExcelFile.sheet_names``
@@ -2023,7 +2024,7 @@ Using the sheet index:
20232024
.. code-block:: python
20242025
20252026
# Returns a DataFrame
2026-
read_excel('path_to_file.xls', 0, index_col=None, na_values=['NA'])
2027+
read_excel('path_to_file.xls', 0, index_col=None, na_values=['NA'])
20272028
20282029
Using all default values:
20292030

@@ -2040,7 +2041,7 @@ Using None to get all sheets:
20402041
read_excel('path_to_file.xls',sheetname=None)
20412042
20422043
Using a list to get multiple sheets:
2043-
2044+
20442045
.. code-block:: python
20452046
20462047
# Returns the 1st and 4th sheet, as a dictionary of DataFrames.
@@ -3422,7 +3423,7 @@ The key functions are:
34223423
The function :func:`~pandas.read_sql` is a convenience wrapper around
34233424
:func:`~pandas.read_sql_table` and :func:`~pandas.read_sql_query` (and for
34243425
backward compatibility) and will delegate to specific function depending on
3425-
the provided input (database table name or sql query).
3426+
the provided input (database table name or sql query).
34263427
Table names do not need to be quoted if they have special characters.
34273428

34283429
In the following example, we use the `SQlite <http://www.sqlite.org/>`__ SQL database

doc/source/whatsnew/v0.16.0.txt

+9-11
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ New features
2222

2323
- Reindex now supports ``method='nearest'`` for frames or series with a monotonic increasing or decreasing index (:issue:`9258`):
2424

25-
.. ipython:: python
25+
.. ipython:: python
2626

27-
df = pd.DataFrame({'x': range(5)})
28-
df.reindex([0.2, 1.8, 3.5], method='nearest')
27+
df = pd.DataFrame({'x': range(5)})
28+
df.reindex([0.2, 1.8, 3.5], method='nearest')
2929

3030
This method is also exposed by the lower level ``Index.get_indexer`` and ``Index.get_loc`` methods.
3131

@@ -108,9 +108,7 @@ Backwards incompatible API changes
108108
- ``TimedeltaIndex.freqstr`` now output the same string format as ``DatetimeIndex``. (:issue:`9116`)
109109

110110

111-
- Bar and horizontal bar plots no longer add a dashed line along the info axis.
112-
The prior style can be achieved with matplotlib's ``axhline`` or ``axvline``
113-
methods (:issue:`9088`).
111+
- Bar and horizontal bar plots no longer add a dashed line along the info axis. The prior style can be achieved with matplotlib's ``axhline`` or ``axvline`` methods (:issue:`9088`).
114112

115113

116114
- ``Series`` now supports bitwise operation for integral types (:issue:`9016`)
@@ -203,12 +201,12 @@ Enhancements
203201

204202
- Added ``StringMethods.isnumeric`` and ``isdecimal`` which behave as the same as standard ``str`` (:issue:`9439`)
205203
- The ``read_excel()`` function's :ref:`sheetname <_io.specifying_sheets>` argument now accepts a list and ``None``, to get multiple or all sheets respectively. If more than one sheet is specified, a dictionary is returned. (:issue:`9450`)
206-
207-
.. code-block:: python
208204

209-
# Returns the 1st and 4th sheet, as a dictionary of DataFrames.
210-
pd.read_excel('path_to_file.xls',sheetname=['Sheet1',3])
211-
205+
.. code-block:: python
206+
207+
# Returns the 1st and 4th sheet, as a dictionary of DataFrames.
208+
pd.read_excel('path_to_file.xls',sheetname=['Sheet1',3])
209+
212210
- A ``verbose`` argument has been augmented in ``io.read_excel()``, defaults to False. Set to True to print sheet names as they are parsed. (:issue:`9450`)
213211
- Added ``StringMethods.ljust()`` and ``rjust()`` which behave as the same as standard ``str`` (:issue:`9352`)
214212
- ``StringMethods.pad()`` and ``center()`` now accept ``fillchar`` option to specify filling character (:issue:`9352`)

0 commit comments

Comments
 (0)