You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "slatebit (Jira)" <ji...@apache.org> on 2020/12/16 04:05:00 UTC

[jira] [Created] (ARROW-10935) [Python] pa.array() doesn't support pa.lib.TimestampScalar objects

slatebit created ARROW-10935:
--------------------------------

             Summary: [Python] pa.array() doesn't support pa.lib.TimestampScalar objects
                 Key: ARROW-10935
                 URL: https://issues.apache.org/jira/browse/ARROW-10935
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
    Affects Versions: 2.0.0
         Environment: Windows 10, Python 3.7.4, PyArrow 2.0.0
            Reporter: slatebit


I encountered this edge case bug in PyArrow v2.0.0. For some reason, pa.array() does not know how to support pa.lib.TimestampScalar objects. This bug completely blocks my specific use case, although I do recognize that this edge case seems kind of wonky. Nonetheless, I don't see any reason why PyArrow would not understand one of it's own object types.

 

Stacktrace:
{code:java}
ArrowInvalid: Could not convert 2020-11-04 22:50:16.276892 with type pyarrow.lib.TimestampScalar: did not recognize Python value type when inferring an Arrow data type
{code}
 

Reproducible Code:
{code:java}
import pandas as pd
import pyarrow as pa

pa.array([pa.scalar(pd.to_datetime('2020-11-04 22:50:16.276892000'))])
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)