-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Add extra test for pandas.to_numeric() for issue #32394 #32560
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
TST: Add extra test for pandas.to_numeric() for issue #32394 #32560
Conversation
def test_failure_to_convert_uint64_string_to_NaN(): | ||
# GH 32394 | ||
result = to_numeric("uint64", errors="coerce") | ||
assert np.isnan(result) |
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.
I think this is a good test, but we generally add the OP example as a test too.
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.
This is basically the OP example, you know, since the first thing that to_numeric
does is putting that scalar value in a object array (the bug was about the "uint64" string, not about whether it was passed as a list, series, array or scalar)
@roberthdevries if you can add the OP test as well here. thanks. |
b70728e
to
a30d0ba
Compare
OP test added |
thanks @roberthdevries |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff