Skip to content

Commit 91030a6

Browse files
Merge pull request #10488 from jaidevd/jd-doc-na-values
DOC: Better explain the behaviour of na_values
2 parents 0189bae + 9e6c29a commit 91030a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/source/io.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ They can take a number of arguments:
115115
as the index.
116116
- ``names``: List of column names to use as column names. To replace header
117117
existing in file, explicitly pass ``header=0``.
118-
- ``na_values``: optional list of strings to recognize as NaN (missing
118+
- ``na_values``: optional string or list of strings to recognize as NaN (missing
119119
values), either in addition to or in lieu of the default set.
120120
- ``true_values``: list of strings to recognize as ``True``
121121
- ``false_values``: list of strings to recognize as ``False``
@@ -723,7 +723,8 @@ NA Values
723723
~~~~~~~~~
724724

725725
To control which values are parsed as missing values (which are signified by ``NaN``), specifiy a
726-
list of strings in ``na_values``. If you specify a number (a ``float``, like ``5.0`` or an ``integer`` like ``5``),
726+
string in ``na_values``. If you specify a list of strings, then all values in
727+
it are considered to be missing values. If you specify a number (a ``float``, like ``5.0`` or an ``integer`` like ``5``),
727728
the corresponding equivalent values will also imply a missing value (in this case effectively
728729
``[5.0,5]`` are recognized as ``NaN``.
729730

0 commit comments

Comments
 (0)