Skip to content

Commit eb11a27

Browse files
committed
If check generic fixes bug 60343
1 parent c30b92c commit eb11a27

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/construction.py

+2
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,8 @@ def sanitize_array(
596596
# create an extension array from its dtype
597597
_sanitize_non_ordered(data)
598598
cls = dtype.construct_array_type()
599+
if not hasattr(data, "__array__"):
600+
data = list(data)
599601
subarr = cls._from_sequence(data, dtype=dtype, copy=copy)
600602

601603
# GH#846

0 commit comments

Comments
 (0)