[FEA] Support `top_k_by` and `bottom_k_by`
Open
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
Assessment
This issue has not been assessed yet.