Skip to content

Commit a5821d3

Browse files
committed
doc updates
1 parent e0e5ae8 commit a5821d3

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

doc/source/io.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ using the ``converters`` argument of :func:`~pandas.read_csv` would certainly be
477477
worth trying.
478478

479479
.. versionadded:: 0.20.0 support for the Python parser.
480+
480481
The ``dtype`` option is supported by the 'python' engine
481482

482483
.. note::

doc/source/whatsnew/v0.20.0.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,17 @@ New features
2222
~~~~~~~~~~~~
2323

2424

25+
``read_csv`` supports ``dtype`` keyword for python engine
26+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2527

28+
The ``dtype`` keyword argument in the :func:`read_csv` function for specifying the types of parsed columns
29+
is now supported with the ``'python'`` engine. See the :ref:`io docs <io.dtypes>` for more information.
2630

31+
.. ipython:: python
32+
33+
data = "a,b\n1,2\n3,4"
34+
pd.read_csv(StringIO(data), engine='python').dtypes
35+
pd.read_csv(StringIO(data), engine='python', dtype={'a':'float64', 'b':'object'}).dtypes
2736

2837
.. _whatsnew_0200.enhancements.other:
2938

@@ -32,14 +41,6 @@ Other enhancements
3241

3342
- ``pd.read_excel`` now preserves sheet order when using ``sheetname=None`` (:issue:`9930`)
3443

35-
- The ``dtype`` keyword argument in the :func:`read_csv` function for specifying the types of parsed columns
36-
is now supported with the ``'python'`` engine. See the :ref:`io docs <io.dtypes>` for more information.
37-
38-
.. ipython:: python
39-
40-
data = "a,b\n1,2\n3,4"
41-
pd.read_csv(StringIO(data), engine='python').dtypes
42-
pd.read_csv(StringIO(data), engine='python', dtype={'a':'float64', 'b':'object'}).dtypes
4344

4445
.. _whatsnew_0200.api_breaking:
4546

0 commit comments

Comments
 (0)