NVIDIA / NVIDIA/cudf

[BUG] Reduction operations return `nan` instead of `NA`

Open
#14,219 2 comments 0 reactions 0 assignees View on GitHub
bug cudf.pandas Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Describe the bug**
For non-float columns, we will need to return `NA` for results where needed instead of `nan`.

**Steps/Code to reproduce bug**
```python
In [32]: import pandas as pd

In [33]: s = pd.Series([1, 2, 3, 4, 5, None], dtype='Int64')

In [34]: s.sum(min_count=6)
Out[34]:

In [35]: import cudf

In [36]: gs = cudf.from_pandas(s)

In [37]: gs
Out[37]:
0 1
1 2
2 3
3 4
4 5
5
dtype: int64

In [38]: gs.sum(min_count=6)
Out[38]: nan
```

**Expected behavior**
```python
In [38]: gs.sum(min_count=6)
Out[38]: NA
```

**Environment overview (please complete the following information)**
- Environment location: [Bare-metal]
- Method of cuDF install: [from source]

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.