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 537671a commit b7ab155Copy full SHA for b7ab155
pandas/core/construction.py
@@ -612,8 +612,10 @@ def sanitize_array(
612
if dtype is None:
613
subarr = data
614
if data.dtype == object and infer_object:
615
- fltarr = data.ravel() # GH#61026
616
- subarr = maybe_infer_to_datetimelike(fltarr)
+ if data.ndim != 1:
+ # GH#61026
617
+ subarr = data.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