-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
BUG: Fix maybe_convert_numeric for unhashable objects #13326
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: Fix maybe_convert_numeric for unhashable objects #13326
Conversation
956f9e3 to
80b8515
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.
add the issue number here as a comment
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.
test usage of pd.to_numeric as well (tests in pandas/tools
Current coverage is 84.22%@@ master #13326 diff @@
==========================================
Files 138 138
Lines 50684 50681 -3
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 42684 42682 -2
+ Misses 8000 7999 -1
Partials 0 0
|
doc/source/whatsnew/v0.18.2.txt
Outdated
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.
Bug in pd.to_numeric when errors='coerce' and input contains non-hashable objects....
8fc536f to
2db755f
Compare
|
@jreback i've made the changes you suggested |
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.
use tm.assert_numpy_array_equal (we don't use th numpy testing functions at all; in fact there is a check again them; though this one slipped thru)
752ac47 to
bf4f9d8
Compare
|
looks good. ping when green. |
b09a1b3 to
76a0738
Compare
|
@RogerThomas thanks! I was just experimenting with something and: so maybe should change this to though can't seem to get this to trigger |
|
if you want to see if you can generate a test that makes this fail (not sure). If so , can you do a followup? |
|
Hey @jreback, I think this is just due to python's syntax parser. In [1]: a = 1
In [2]: a.__hash__
Out[2]: <method-wrapper '__hash__' of int object at 0xa63b00>I don't think this could ever fail |
|
oh ok that makes sense thanks |
git diff upstream/master | flake8 --diff