NVIDIA / NVIDIA/cudf

[FEA] Support `top_k_by` and `bottom_k_by`

Open
#18,239 0 comments 0 reactions 0 assignees View on GitHub
cudf-polars 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.**
We should support both `top_k_by` and `bottom_k_by`
```python
df.select(
pl.all().top_k_by("a", 2).name.suffix("_top_by_a"),
pl.all().top_k_by("b", 2).name.suffix("_top_by_b"),
)
```
**Describe the solution you'd like**
Expose them both in polars (if needed) and then add them to cudf.polars

xref #16223

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.