-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Don't parse NaN as 'nan' in Data IO #23162
Conversation
Hello @gfyoung! Thanks for submitting the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #23162 +/- ##
=======================================
Coverage 92.19% 92.19%
=======================================
Files 169 169
Lines 50954 50954
=======================================
Hits 46975 46975
Misses 3979 3979
Continue to review full report at Codecov.
|
a55e8d0
to
5285f5b
Compare
Haven't reviewed in detail yet but this may also close #21131 |
Looks like Azure is failing on |
5285f5b
to
dea9b7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
much nicer this version. just a couple of doc-strings. IN a followup, you can see if you can change the default in astype_nansafe
to skipna=True
but that might affect other parts of the codebase.
dea9b7c
to
524dbb3
Compare
524dbb3
to
ddd1be3
Compare
@jreback : Addressed all comments, and all is green again! PTAL. |
thanks @gfyoung very nice, keep em coming! |
@@ -1685,7 +1685,8 @@ def _cast_types(self, values, cast_type, column): | |||
|
|||
else: | |||
try: | |||
values = astype_nansafe(values, cast_type, copy=True) | |||
values = astype_nansafe(values, cast_type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gfyoung this is a longshot but any idea why you passed skipna=True here but not 9 lines up?
Re-implementation of #20429, with a couple of changes:
whatsnew
entry now has a separate section for this change (read_excel with dtype=str converts empty cells to np.nan #20429 (comment))parsers.py
and does not impact other functionality.Closes #20377.