[BUG] Nulls render incorrectly in pandas compatibility mode
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Describe the bug**
In pandas compatibility mode, columns of float type render null entries as "nan" instead of NA.
The value is being produced [here](https://github.com/rapidsai/cudf/blob/90bab494a498f213059ffb52a5538ffa6e3fa253/python/cudf/cudf/core/column/column.py#L301). The current rendering seems to have been selected for a specific reason in #19478, perhaps @galipremsagar will remember why. Otherwise we can just open a PR changing that and see what breaks, I'm assuming it'll be one of the pandas tests that we reenabled in that PR and then we can see what we need to do to make the rendering decision more precise.
**Steps/Code to reproduce bug**
```python
>>> import pandas as pd
>>> import cudf
>>> pd.Series([1, pd.NA])
0 1
1
dtype: object
>>> with cudf.option_context("mode.pandas_compatible", True):
... cudf.Series([1, None], dtype="float")
...
0 1.0
1 nan
dtype: float64
>>> with cudf.option_context("mode.pandas_compatible", False):
... cudf.Series([1, None], dtype="float")
...
0 1.0
1
dtype: float64
```
**Expected behavior**
The rendering should be the same as pandas.
Contributor guide
Assessment
This issue has not been assessed yet.