Skip to content

Conversation

@lukemanley
Copy link
Member

@lukemanley lukemanley commented Nov 20, 2022

Fixes the following:

import pandas as pd

arr = pd.array([pd.Timedelta(days=1)]) 
arr.astype("duration[ns][pyarrow]")     # <- raises

TypeError: Cannot convert ArrowDtype to numpy.dtype

@lukemanley lukemanley added Bug Dtype Conversions Unexpected or buggy dtype conversions Timedelta Timedelta data type Arrow pyarrow functionality labels Nov 20, 2022
@mroeschke mroeschke added this to the 2.0 milestone Nov 22, 2022
@mroeschke mroeschke merged commit 7d7c818 into pandas-dev:main Nov 22, 2022
@mroeschke
Copy link
Member

Thanks @lukemanley

mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
@lukemanley lukemanley deleted the timedelta-to-pyarrow branch December 20, 2022 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arrow pyarrow functionality Bug Dtype Conversions Unexpected or buggy dtype conversions Timedelta Timedelta data type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants