Skip to content

[Python] Accept pd.NA as missing value in array constructor #25486

@asfimport

Description

@asfimport

Currently we don't support using pandas.NA at all:

In [1]: import pyarrow as pa

In [2]: import pandas as pd

In [3]: pa.array([pd.NA, "A"])
---------------------------------------------------------------------------
ArrowInvalid                              Traceback (most recent call last)
<ipython-input-3-77e774fa8521> in <module>
----> 1 pa.array([pd.NA, "A"])

~/miniconda3/envs/fletcher/lib/python3.8/site-packages/pyarrow/array.pxi in pyarrow.lib.array()

~/miniconda3/envs/fletcher/lib/python3.8/site-packages/pyarrow/array.pxi in pyarrow.lib._sequence_to_array()

~/miniconda3/envs/fletcher/lib/python3.8/site-packages/pyarrow/error.pxi in pyarrow.lib.check_status()

ArrowInvalid: Could not convert <NA> with type NAType: did not recognize Python value type when inferring an Arrow data type

Reporter: Uwe Korn / @xhochy
Assignee: Wes McKinney / @wesm

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-9407. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions