Make ReducedGroupBy implement DataFrame interface
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
This expression appears to be a shortcut
```
df_3.groupBy { year }.maxBy { gflops.toDouble() }
```
for
```
df_3.groupBy { year }.aggregate {
maxBy { gflops.toDouble() }
}
```
But it isn't. maxBy returns a `ReducedGroupBy` and you need to call `into` or `values` `df_3.groupBy { year }.maxBy { gflops.toDouble() }.values()`. I always found it to be confusing. Before you can work with data as it appears in the table, you need to figure out what `into` or `values` do. For me these functions seem like *optional steps*

We can use approach proposed [here](https://github.com/Kotlin/dataframe/commit/20cab7a12968babcb7f9d8ce8a24e3ca0917eda1) by @Jolanrensen and make ReducedGroupBy : DataFrame, so you can both use DF api and `into`, `values` on the object. See if it worth it for ReducedPivot and ReducedPivotGroupBy too. I wouldn't go as far as implementing it for all intermediate objects though because there all steps are mandatory. It doesn't make sense to `df.convert { }.add() { }`
Contributor guide
Research direction
Start by reviewing the ReducedGroupBy API and the linked commit approach. Check whether ReducedPivot and ReducedPivotGroupBy should be treated similarly, then verify that the resulting object supports DataFrame operations while into and values remain available; the groupBy/maxBy examples should work without an extra conversion step.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100