Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
Any environment
Description
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:
### 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")
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
Attachments
Issue Links
- links to