apache / apache/arrow

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

Open
#39,394 5 comments 0 reactions 1 assignee Claimed by @LucasG0 View on GitHub
Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

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

```python
In [1]: import pyarrow as pa

In [4]: pa.array(pa.array([float("nan"), None]), from_pandas=True)
Out[4]:

[
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.