-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
[EA] ExtensionArray should support ndim==2 #21908
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
Comments
We deliberately restricted it to 1D, and I think that is still the good way to go. |
I'll try to track down this discussion and see the original reasoning. AFAICT the main thing we get out of the 1D restriction is not having to worry about |
i agree that we should restrict to 1D and just move datetime to EA |
We are moving datetime to EA, that is currently in progress. What I'm saying is that there are bugs that are caused by the inability to reshape e.g. |
We will need to update the code to handle with 1D instead of 2D, for sure.
Yes, I think that is one of the main reasons. This fact is one of the things that make the current block manager really complex. |
Fair enough. Closing, will chime in in the appropriate place. |
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 ofDataFrame._init_ndarray
is:but in the relevant cases,
maybe_infer_to_datetimelike
returns a tz-awareDatetimeIndex
, whichcreate_block_manager_from_blocks
raises on because it is expectingvalues
to be 2D.I cleanest way to fix this seems to be supporting 2D shapes for
DatetimeArray
(and ideally others for compat)The text was updated successfully, but these errors were encountered: