|
4 | 4 | import numpy as np
|
5 | 5 | from pandas._libs import lib, missing as libmissing
|
6 | 6 | from pandas._libs.tslib import NaT, iNaT
|
| 7 | +from pandas.core.dtypes import cast |
7 | 8 | from .generic import (ABCMultiIndex, ABCSeries,
|
8 | 9 | ABCIndexClass, ABCGeneric,
|
9 | 10 | ABCExtensionArray)
|
@@ -120,7 +121,9 @@ def _isna_new(obj):
|
120 | 121 | return _isna_ndarraylike(obj)
|
121 | 122 | elif isinstance(obj, ABCGeneric):
|
122 | 123 | return obj._constructor(obj._data.isna(func=isna))
|
123 |
| - elif isinstance(obj, list) or hasattr(obj, '__array__'): |
| 124 | + elif isinstance(obj, list): |
| 125 | + return _isna_ndarraylike(np.asarray(obj, dtype=object)) |
| 126 | + elif hasattr(obj, '__array__'): |
124 | 127 | return _isna_ndarraylike(np.asarray(obj))
|
125 | 128 | else:
|
126 | 129 | return obj is None
|
@@ -202,6 +205,7 @@ def _isna_ndarraylike(obj):
|
202 | 205 |
|
203 | 206 | if is_string_like_dtype(dtype):
|
204 | 207 | # object array of strings
|
| 208 | + print('str') |
205 | 209 | result = np.zeros(values.shape, dtype=bool)
|
206 | 210 | else:
|
207 | 211 | # object array of non-strings
|
|
0 commit comments