We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a156d2c commit e04b2bfCopy full SHA for e04b2bf
pandas/_libs/lib.pyx
@@ -995,7 +995,7 @@ cdef inline bint c_is_list_like(object obj, bint allow_sets) except -1:
995
# we do not count strings/unicode/bytes as list-like
996
and not isinstance(obj, (str, bytes))
997
# exclude zero-dimensional duck arrays, effectively scalars
998
- and getattr(obj, "ndim", 0) != 0
+ and not (hasattr(obj, "ndim") and obj.ndim == 0)
999
# exclude sets if allow_sets is False
1000
and not (allow_sets is False and isinstance(obj, abc.Set))
1001
)
0 commit comments