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 57fd502 commit d2f0c7cCopy full SHA for d2f0c7c
pandas/core/construction.py
@@ -612,7 +612,10 @@ def sanitize_array(
612
if dtype is None:
613
subarr = data
614
if data.dtype == object and infer_object:
615
- subarr = maybe_infer_to_datetimelike(data)
+ # GH#61026
616
+ if data.ndim != 1:
617
+ subarr = subarr.ravel()
618
+ subarr = maybe_infer_to_datetimelike(subarr)
619
elif data.dtype.kind == "U" and using_string_dtype():
620
from pandas.core.arrays.string_ import StringDtype
621
0 commit comments