NVIDIA / NVIDIA/cudf

Refactor groupby to rely less on storing keys as `Index` objects

Open
#12,037 0 comments 0 reactions 0 assignees View on GitHub
0 - Backlog feature request Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

https://github.com/rapidsai/cudf/pull/11792 introduces the ability to group on list columns. In the future, we can expect grouping by, e.g., structs and other types that are not supported by Pandas.

In https://github.com/rapidsai/cudf/issues/6932, we made the decision not to support creating an `Index` with elements of type `list`.

Unfortunately, our groupby internals rely heavily on being able to store the key columns of a groupby as an `Index`. In particular, the internal [`_Grouping.keys`](https://github.com/rapidsai/cudf/blob/991c86b13acdbc28ab60609bee6eba2f9eac1ecc/python/cudf/cudf/core/groupby/groupby.py#L1836) method is heavily used.

We should rely less on storing keys as `Index` objects, which will make it much easier to support grouping by lists and structs.

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.