-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Description
There are a bunch of issues (indirectly) caused by the fact that we can't reshape a DatetimeIndex[tz] as 2D.
#13287, #17539, #19197, and each of the several issues about interpolation with datetime64[tz] dtypes. At the end of DataFrame._init_ndarray is:
if dtype is None and is_object_dtype(values):
values = maybe_infer_to_datetimelike(values)
return create_block_manager_from_blocks([values], [columns, index])
but in the relevant cases, maybe_infer_to_datetimelike returns a tz-aware DatetimeIndex, which create_block_manager_from_blocks raises on because it is expecting values to be 2D.
I cleanest way to fix this seems to be supporting 2D shapes for DatetimeArray (and ideally others for compat)
Metadata
Metadata
Assignees
Labels
No labels