-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: to_numeric should raise if input is more than one dimension #11776 #11780
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: to_numeric should raise if input is more than one dimension #11776 #11780
Conversation
elif getattr(arg, 'ndim', None) == 1: | ||
pass | ||
else: | ||
raise TypeError('arg must be a list, tuple, 1-d array, or Series') |
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.
fix the doc-string to match this
pls add a whats new note (you can do in bug fixes) |
a7ab458
to
db3994b
Compare
@@ -37,7 +37,7 @@ def to_timedelta(arg, unit='ns', box=True, errors='raise', coerce=None): | |||
|
|||
def _convert_listlike(arg, box, unit, name=None): | |||
|
|||
if isinstance(arg, (list,tuple)) or ((hasattr(arg,'__iter__') and not hasattr(arg,'dtype'))): | |||
if isinstance(arg, (list, tuple)) or not hasattr(arg, 'dtype'): |
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.
note that there's no need to check hasattr(arg,'__iter__')
because is_list_like
already checks for that
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.
np
bd9f25a
to
a44f8be
Compare
@jreback it's updated |
a44f8be
to
dc2a5b3
Compare
@jreback @jorisvandenbossche updated again |
travis is green now |
BUG: to_numeric should raise if input is more than one dimension #11776
thanks! |
closes #11776