Skip to content

Commit

Permalink
Change or to and for checking iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
huashuai committed Sep 25, 2017
1 parent 7a179d6 commit 08c0b26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/core/dtypes/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,10 @@ def is_list_like(obj):
False
"""

return ((hasattr(obj, '__iter__') or isinstance(obj, Iterable)) and
return (hasattr(obj, '__iter__') and isinstance(obj, Iterable) and
not isinstance(obj, string_and_binary_types))


def is_nested_list_like(obj):
"""
Check if the object is list-like, and that all of its elements
Expand Down

0 comments on commit 08c0b26

Please sign in to comment.