Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jorisvandenbossche opened this issue Apr 26, 2021 · 0 comments · Fixed by #41202
Closed

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

jorisvandenbossche opened this issue Apr 26, 2021 · 0 comments · Fixed by #41202
Labels
Internals Related to non-user accessible pandas implementation Regression Functionality that used to work in a prior pandas version
Milestone

Comments

@jorisvandenbossche
Copy link
Member

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

@jorisvandenbossche jorisvandenbossche added Regression Functionality that used to work in a prior pandas version Internals Related to non-user accessible pandas implementation labels Apr 26, 2021
@jorisvandenbossche jorisvandenbossche added this to the 1.3 milestone Apr 26, 2021
jbrockmendel added a commit to jbrockmendel/pandas that referenced this issue Apr 28, 2021
yeshsurya pushed a commit to yeshsurya/pandas that referenced this issue May 6, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this issue Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internals Related to non-user accessible pandas implementation Regression Functionality that used to work in a prior pandas version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant