NVIDIA / NVIDIA/cudf

[FEA] `fillna()` doesn't accept axis keyword

Open
#5,556 2 comments 0 reactions 0 assignees View on GitHub
0 - Blocked feature request Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**

`fillna()` doesn't accept axis keyword

**Describe the solution you'd like**

Add support for the `axis` keyword

**Describe alternatives you've considered**

In our use case `axis` keyword was redundant, it worked without it

**Additional context**

Pandas showcase:
```python

import pandas as pd

data = pd.DataFrame(
data=([[None, None, 100, 1000, 10000], [2, 20, 200, 2000, 20000]]), columns=['a', 'b', 'c', 'd', 'e']
)

data1 = pd.DataFrame(
data=([[3, 33], [2, 22]]), columns=['a', 'b']
)
data.fillna(data1, axis=1)
```

cuDF showcase:
```python
import cudf as pd

data = pd.DataFrame(
data=([[None, None, 100, 1000, 10000], [2, 20, 200, 2000, 20000]]), columns=['a', 'b', 'c', 'd', 'e']
)

data1 = pd.DataFrame(
data=([[3, 33], [2, 22]]), columns=['a', 'b']
)
data.fillna(data1, axis=1) # the axis keyword is not supported

```

Traceback:
```python
---------------------------------------------------------------------------
NotImplementedError Traceback (most recent call last)
in
9 data=([[3, 33], [2, 22]]), columns=['a', 'b']
10 )
---> 11 data.fillna(data1, axis=1) # the axis keyword is not supported

~/miniconda3/envs/rapids14/lib/python3.7/site-packages/cudf/core/dataframe.py in fillna(self, value, method, axis, inplace, limit)
3815 axis=axis,
3816 inplace=inplace,
-> 3817 limit=limit,
3818 )
3819

~/miniconda3/envs/rapids14/lib/python3.7/site-packages/cudf/core/series.py in fillna(self, value, method, axis, inplace, limit)
1605 raise NotImplementedError("The limit keyword is not supported")
1606 if axis:
-> 1607 raise NotImplementedError("The axis keyword is not supported")
1608
1609 data = self._column.fillna(value)

NotImplementedError: The axis keyword is not supported
```

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.