-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Python] pa.array() doesn't support pa.lib.TimestampScalar objects #26862
Copy link
Copy link
Closed
Labels
Component: PythonPriority: BlockerMarks a blocker for the releaseMarks a blocker for the releaseType: bug
Description
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:
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
Reproducible Code:
import pandas as pd
import pyarrow as pa
pa.array([pa.scalar(pd.to_datetime('2020-11-04 22:50:16.276892000'))])Environment: Windows 10, Python 3.7.4, PyArrow 2.0.0
Reporter: slatebit
Related issues:
- [Python] accept pyarrow values / scalars in constructor functions ? (is duplicated by)
Note: This issue was originally created as ARROW-10935. Please see the migration documentation for further details.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: PythonPriority: BlockerMarks a blocker for the releaseMarks a blocker for the releaseType: bug