[FEA] Add support for limit to Series.fillna
Open
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
Assessment
This issue has not been assessed yet.