File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ using the ``converters`` argument of :func:`~pandas.read_csv` would certainly be
477477worth 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 ::
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments