NVIDIA / NVIDIA/cudf

[FEA] read_csv -> skiprows parameter: support list-like and callable arguments

Open
#5,017 2 comments 0 reactions 0 assignees View on GitHub
cuIO 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.**
I am porting some existing code from Pandas to cuDF, when I have noticed that `skiprows` parameter in `read_csv` method does not suport neither `list-like` nor `callable` arguments.

**Describe the solution you'd like**
Support the same argument types as Pandas: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html

It is very useful to load subsets of huge files:
df = pd.read_csv("dataset.csv", skiprows = lambda x: x>0 and np.random.rand() > 0.01)

**Describe alternatives you've considered**
None

**Additional context**
Tested with RAPIDS 0.13

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.