Kotlin / Kotlin/dataframe

`max` with more than one selected column on `Pivot` aggregates each column separately in Notebooks

Open
#1,811 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

```kotlin
df.pivot { isHappy }.max { age and weight }
```
in a Gradle project results in:
![gradle](https://github.com/user-attachments/assets/615b01d0-95da-4c1a-9cf2-a47d6091d358)
finding the maximum value among all the selected columns.

But in Kotlin Notebooks it results in:
![notebook](https://github.com/user-attachments/assets/91b3d12a-df77-4101-acce-571fa449a6a0)
finding the maximum for each column separately.

The expected behavior is as in the Gradle project.

Contributor guide

Open the contributing guide

Research direction

Reproduce the `df.pivot { isHappy }.max { age and weight }` example in both a Kotlin Notebook and a Gradle project, comparing the aggregation results. Investigate the notebook-specific behavior; done means the Kotlin Notebook matches the Gradle result by finding one maximum across the selected columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.