Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.8.0
Description
> import pyarrow
> from datetime import datetime
> import pandas
> dt = pandas.Series([datetime(2017, 12, 1), datetime(2017, 12, 3), datetime(2017, 12, 15)], dtype=object)
> pyarrow.array(dt, from_pandas=True)
Raises following:
---------------------------------------------------------------------------
ArrowInvalid Traceback (most recent call last)
<ipython-input-8-0d49f7fc5c49> in <module>()
----> 1 pyarrow.array(dt, from_pandas=True)
array.pxi in pyarrow.lib.array()
array.pxi in pyarrow.lib._ndarray_to_array()
error.pxi in pyarrow.lib.check_status()
ArrowInvalid: Error inferring Arrow type for Python object array. Got Python object of type datetime but can only handle these types: string, bool, float, int, date, time, decimal, list, array
As far as I can tell, the issue seems to be the call to PyDate_CheckExact here (instead of using PyDate_Check):
Attachments
Issue Links
- links to