-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Error when specifying int index containing NaN #15616
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
Conversation
|
||
dtype = self.dtype | ||
if self._is_numeric_dtype and np.any(isnull(values)): | ||
# We can't coerce to the numeric dtype of "self" (unless |
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.
-> isnull(values).any()
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.
Breaks if values
is a scalar.
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.
hmm, that's annoying. ok then.
looks good. maybe some test cases for the fail conditions that you are now catching? |
Ah, good catch. I thought I had added some. Will do. |
Codecov Report
@@ Coverage Diff @@
## master #15616 +/- ##
==========================================
- Coverage 91.02% 91% -0.02%
==========================================
Files 143 143
Lines 49324 49334 +10
==========================================
Hits 44897 44897
- Misses 4427 4437 +10
Continue to review full report at Codecov.
|
@jreback : Added tests, and everything is green. |
Partially addresses pandas-devgh-15187.
thanks! |
xref pandas-dev#15187. Author: gfyoung <[email protected]> Closes pandas-dev#15616 from gfyoung/nan-int-index and squashes the following commits: 195b830 [gfyoung] BUG: Error when specifying int index containing NaN
Finally got around to patching this. Partially addresses #15187.