NVIDIA / NVIDIA/cudf

[FEA] Add support for limit to Series.fillna

Open
#8,305 3 comments 0 reactions 0 assignees View on GitHub
feature request libcudf 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.**
It is not currently possible to limit the number of missing values filled consecutively using `fillna`.

**Describe the solution you'd like**
Support for a limit argument similar to how pandas does it.

**Describe alternatives you've considered**
Writing a clunkier version of fillna that keeps track of the number of missing values filled.

**Additional context**
Example:
```python
import cudf
sr = cudf.Series([1, 2, None, None, 5])
sr.fillna(method='pad', limit=1)
```
Should return:
```
0 1
1 2
2 2
3
4 5
dtype: int64
```
But throws a NotImplementedError instead

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.