Skip to content

REGR: make_block should still handle 1D DatetimeTZ data for 2D block #41168

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

Caused by #41082, the following now fails:

In [1]: dtidx = pd.date_range("2012", periods=3, tz="UTC")

In [2]: pd.core.internals.make_block(dtidx, placement=[0])
...
ValueError: Wrong number of dimensions. values.ndim != ndim [1 != 2]

Even though the Block is now stored as 2D values, in our internal "public" API, we should still accept 1D values for datetimetz.

From the dask tests, dask/dask#7607

cc @jbrockmendel

Metadata

Metadata

Assignees

No one assigned

    Labels

    InternalsRelated to non-user accessible pandas implementationRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions