Skip to content

Commit 08c0b26

Browse files
committed
Change or to and for checking iterable
1 parent 7a179d6 commit 08c0b26

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: pandas/core/dtypes/inference.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,10 @@ def is_list_like(obj):
263263
False
264264
"""
265265

266-
return ((hasattr(obj, '__iter__') or isinstance(obj, Iterable)) and
266+
return (hasattr(obj, '__iter__') and isinstance(obj, Iterable) and
267267
not isinstance(obj, string_and_binary_types))
268268

269+
269270
def is_nested_list_like(obj):
270271
"""
271272
Check if the object is list-like, and that all of its elements

0 commit comments

Comments
 (0)