Skip to content

Commit 83a46ca

Browse files
jowagnerTomAugspurger
authored andcommitted
Mention NaN handling in dtype description (#20895)
1 parent a5c02d5 commit 83a46ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/source/io.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ General Parsing Configuration
168168

169169
dtype : Type name or dict of column -> type, default ``None``
170170
Data type for data or columns. E.g. ``{'a': np.float64, 'b': np.int32}``
171-
(unsupported with ``engine='python'``). Use `str` or `object` to preserve and
171+
(unsupported with ``engine='python'``). Use `str` or `object` together
172+
with suitable ``na_values`` settings to preserve and
172173
not interpret dtype.
173174

174175
.. versionadded:: 0.20.0 support for the Python parser.

pandas/io/parsers.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@
125125
are duplicate names in the columns.
126126
dtype : Type name or dict of column -> type, default None
127127
Data type for data or columns. E.g. {'a': np.float64, 'b': np.int32}
128-
Use `str` or `object` to preserve and not interpret dtype.
128+
Use `str` or `object` together with suitable `na_values` settings
129+
to preserve and not interpret dtype.
129130
If converters are specified, they will be applied INSTEAD
130131
of dtype conversion.
131132
%s

0 commit comments

Comments
 (0)