[ 
https://issues.apache.org/jira/browse/ARROW-17192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alenka Frim reopened ARROW-17192:
---------------------------------

> [Python] Pass **kwargs in read_feather to to_pandas()
> -----------------------------------------------------
>
>                 Key: ARROW-17192
>                 URL: https://issues.apache.org/jira/browse/ARROW-17192
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>         Environment: Any environment
>            Reporter: Adrien Pacifico
>            Assignee: Alenka Frim
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 11.0.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> A feather file with a column containing dates lower than 1677 or greater than 
> 2262 cannot be read with pandas, du to  `.to_pandas` method.
> To reproduce the issue:
> {code:java}
> ### create feather file
> import pandas as pd
> from datetime import datetime
> df = pd.DataFrame({"date": [
> datetime.fromisoformat("1654-01-01"),
> datetime.fromisoformat("1920-01-01"),
> ],})
> df.to_feather("to_trash.feather")
> ### read feather file      
> from pyarrow.feather import read_feather
> read_feather("to_trash.feather")
> {code}
>  
> I think that the expected behavior would be to have an object column 
> contining datetime objects.
> I think that the problem comes from _array_like_to_pandas method : 
> [https://github.com/apache/arrow/blob/76f45a6892b13391fdede4c72934f75f6d56143c/python/pyarrow/array.pxi#L1584]
> or  from `_to_pandas()`
> [https://github.com/apache/arrow/blob/76f45a6892b13391fdede4c72934f75f6d56143c/python/pyarrow/array.pxi#L2742]
> or from `to_pandas`:
> [https://github.com/apache/arrow/blob/76f45a6892b13391fdede4c72934f75f6d56143c/python/pyarrow/array.pxi#L673]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to