You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Thomas Buhrmann (JIRA)" <ji...@apache.org> on 2018/06/13 10:19:00 UTC
[jira] [Created] (ARROW-2706) pandas Timestamp not supported in
ListArray
Thomas Buhrmann created ARROW-2706:
--------------------------------------
Summary: pandas Timestamp not supported in ListArray
Key: ARROW-2706
URL: https://issues.apache.org/jira/browse/ARROW-2706
Project: Apache Arrow
Issue Type: Bug
Components: Python
Affects Versions: 0.9.0
Reporter: Thomas Buhrmann
It seems pandas Timestamps are supported in some places but not others. Specifically, they work in primitive Arrays but not ListArrays:
{code:java}
import pyarrow
from datetime import datetime
ts = [pd.Timestamp(2017, 1, 1, 12), pd.Timestamp(2018, 1, 1, 12)]
dt = [datetime(2017, 1, 1, 12), datetime(2018, 1, 1, 12)]
pyarrow.Table.from_pandas(pd.DataFrame(dict(dates=dt))) # OK :)
pyarrow.Table.from_pandas(pd.DataFrame(dict(dates=[dt, dt]))) # OK :)
pyarrow.Table.from_pandas(pd.DataFrame(dict(dates=ts))) # OK :)
pyarrow.Table.from_pandas(pd.DataFrame(dict(dates=[ts, ts]))) # Fail :(
{code}
The above code results in:
{noformat}
ArrowInvalid: Error inferring Arrow data type for collection of Python objects. Got Python object of type Timestamp but can only handle these types: bool, float, integer, date, datetime, bytes, unicode, decimal{noformat}
I guess this should be supported?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)