Skip to content

[Python] pa.array(pa.array([float("nan")]), from_pandas=True) does not convert nan to null #39394

@mroeschke

Description

@mroeschke

Describe the bug, including details regarding any error messages, version, and platform.

In [1]: import pyarrow as pa

In [4]: pa.array(pa.array([float("nan"), None]), from_pandas=True)
Out[4]: 
<pyarrow.lib.DoubleArray object at 0x7f91bbd90f40>
[
  nan,
  null
]

In [5]: pa.__version__
Out[5]: '14.0.1'

If an arrow array is considered an ndarray-like data according to the docs, I would assume the nan would be inferred as null

Component(s)

Python

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions