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 28fd9e9 commit e04c4e8Copy full SHA for e04c4e8
pandas/core/construction.py
@@ -597,7 +597,7 @@ def sanitize_array(
597
# create an extension array from its dtype
598
_sanitize_non_ordered(data)
599
cls = dtype.construct_array_type()
600
- if isinstance(data, KeysView):
+ if not hasattr(data, "__array__"):
601
data = list(data)
602
subarr = cls._from_sequence(data, dtype=dtype, copy=copy)
603
0 commit comments