apache / apache/arrow

[Python] consistently handle conversion of all-NaN arrays across types

Open
#22,909 0 comments 0 reactions 0 assignees View on GitHub
Component: Python Priority: Major Status: needs champion Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

In ARROW-5682 (https://github.com/apache/arrow/pull/5333), next to fixing actual conversion bugs, I added the ability to convert all-NaN float arrays when converting to string type (and only with `from_pandas=True`). So this now works:

```Java

>>> pa.array(np.array([np.nan, np.nan], dtype=float), type=pa.string(), from_pandas=True)

[
null,
null
]
```

However, I only added this for string type (and it already works for float and int types). If we are happy with this behaviour, we should also add it for other types.

**Reporter**: [Joris Van den Bossche](https://issues.apache.org/jira/browse/ARROW-6548) / @jorisvandenbossche

**Note**: *This issue was originally created as [ARROW-6548](https://issues.apache.org/jira/browse/ARROW-6548). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

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.