Skip to content

Commit 29aa457

Browse files
committed
BUG: Fix isna cannot handle ambiguous typed list
1 parent ef019fa commit 29aa457

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/dtypes/missing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ def _isna_new(obj):
120120
return _isna_ndarraylike(obj)
121121
elif isinstance(obj, ABCGeneric):
122122
return obj._constructor(obj._data.isna(func=isna))
123-
elif isinstance(obj, list) or hasattr(obj, '__array__'):
123+
elif isinstance(obj, list):
124+
return _isna_ndarraylike(np.asarray(obj, dtype=object))
125+
elif hasattr(obj, '__array__'):
124126
return _isna_ndarraylike(np.asarray(obj))
125127
else:
126128
return obj is None

0 commit comments

Comments
 (0)