sergun opened a new issue, #38805:
URL: https://github.com/apache/arrow/issues/38805

   ### 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to