BUG: Don't parse NaN as 'nan' in Data IO
State: closed

Re-implementation of #20429, with a couple of changes:

* The `whatsnew` entry now has a separate section for this change (https://github.com/pandas-dev/pandas/pull/20429#discussion_r180160530)
* The fix is localized as much as possible to `parsers.py` and does not impact other functionality.

Closes #20377.

Labels:
name: IO Data
description: IO issues that don't fit into a more specific label
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
Hello @gfyoung! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/io/parsers.py`](https://github.com/gfyoung/pandas/blob/a55e8d0d06e98f4c1ff38d4c3d0f16b8313d18cf/pandas/io/parsers.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/parser/na_values.py`](https://github.com/gfyoung/pandas/blob/a55e8d0d06e98f4c1ff38d4c3d0f16b8313d18cf/pandas/tests/io/parser/na_values.py) !

 - There are no PEP8 issues in the file [`pandas/tests/io/test_excel.py`](https://github.com/gfyoung/pandas/blob/a55e8d0d06e98f4c1ff38d4c3d0f16b8313d18cf/pandas/tests/io/test_excel.py) !


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23162?src=pr&el=h1) Report
> Merging [#23162](https://codecov.io/gh/pandas-dev/pandas/pull/23162?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/1546c35dc839b3f6c094ad41d14cda24e9e13a0c?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `75%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/23162/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/23162?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #23162   +/-   ##
=======================================
  Coverage   92.19%   92.19%           
=======================================
  Files         169      169           
  Lines       50954    50954           
=======================================
  Hits        46975    46975           
  Misses       3979     3979
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.61% <75%> (ø)` | :arrow_up: |
| #single | `42.27% <50%> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/23162?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/parsers.py](https://codecov.io/gh/pandas-dev/pandas/pull/23162/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhcnNlcnMucHk=) | `95.6% <100%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/23162/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `89.22% <66.66%> (ø)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23162?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/23162?src=pr&el=footer). Last update [1546c35...ddd1be3](https://codecov.io/gh/pandas-dev/pandas/pull/23162?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

Haven't reviewed in detail yet but this may also close #21131
Looks like Azure is failing on `master` but could be addressed by #23182.
@jreback : Addressed all comments, and all is green again!  PTAL.
thanks @gfyoung very nice, keep em coming!