You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the usage question you have. Please include as many useful details as possible.
Is type duration[pyarrow] supported in pandas?
This piece of code creates pd.DataFrame with column "a" of type duration[pyarrow]:
from datetime import datetime
import pyarrow as pa
x = pa.table([[datetime.now()]], ["a"])
y = pa.table([[datetime.now()]], ["a"])
df = x.to_pandas(types_mapper=pd.ArrowDtype)-y.to_pandas(types_mapper=pd.ArrowDtype))
print(df.types)
a duration[us][pyarrow]
dtype: object
But this line:
print(df["a"].dt.days)
raises exception:
AttributeError: Can only use .dt accessor with datetimelike values. Did you mean: 'at'?
Is it a bug or limited support of arrow types in pandas for now?
Component(s)
Python
The text was updated successfully, but these errors were encountered:
Describe the usage question you have. Please include as many useful details as possible.
Is type duration[pyarrow] supported in pandas?
This piece of code creates pd.DataFrame with column "a" of type duration[pyarrow]:
But this line:
raises exception:
Is it a bug or limited support of arrow types in pandas for now?
Component(s)
Python
The text was updated successfully, but these errors were encountered: