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 59aaa8e commit 4fd428fCopy full SHA for 4fd428f
pandas/core/construction.py
@@ -323,8 +323,7 @@ def array(
323
324
# to avoid returning an array of string representation of objects.
325
if dtype == StringDtype():
326
- ndarr = np.array(data)
327
- if ndarr.ndim != 1:
+ if any(not lib.is_scalar(i) for i in data):
328
raise TypeError("Values must be a 1D list-like")
329
330
if isinstance(dtype, ExtensionDtype):
0 commit comments