Refactor groupby to rely less on storing keys as `Index` objects
- 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
Assessment
This issue has not been assessed yet.