Skip to content

BUG: DataFrame[interval[td64]] transpose fails #44917

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
jbrockmendel opened this issue Dec 15, 2021 · 4 comments · Fixed by #49875
Closed

BUG: DataFrame[interval[td64]] transpose fails #44917

jbrockmendel opened this issue Dec 15, 2021 · 4 comments · Fixed by #49875
Assignees
Labels
Bug Interval Interval data type Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@jbrockmendel
Copy link
Member

jbrockmendel commented Dec 15, 2021

tdi = pd.timedelta_range("0 Days", "3 Days")
ii = pd.IntervalIndex.from_breaks(tdi)
ii = ii.insert(-1, np.nan)
df = pd.DataFrame(ii)

>>> df.T
[...]
TypeError: Cannot convert Float64Index to dtype timedelta64[ns]; integer values are required for conversion

This would be solved by having 2D EAs.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 15, 2021
@simonjayhawkins simonjayhawkins added Interval Interval data type Reshaping Concat, Merge/Join, Stack/Unstack, Explode and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 16, 2021
@simonjayhawkins simonjayhawkins added this to the Contributions Welcome milestone Dec 16, 2021
@sukriti1
Copy link
Contributor

take

@weikhor
Copy link
Contributor

weikhor commented May 12, 2022

@jbrockmendel Hi I see this from above This would be solved by having 2D EAs. . May I know what is meaning of 2D EAs?

@jbrockmendel
Copy link
Member Author

2D EAs means making all ExtensionArrays support 2D. There is not consensus on doing this, which seems unlikely to change.

@weikhor
Copy link
Contributor

weikhor commented May 12, 2022

2D EAs means making all ExtensionArrays support 2D. There is not consensus on doing this, which seems unlikely to change.

Ok thank

@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
@jbrockmendel jbrockmendel mentioned this issue Nov 23, 2022
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Interval Interval data type Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants