Add medianBy and percentileBy to the groupBy grammar#1878
Open
Allex-Nik wants to merge 3 commits into
Open
Conversation
…s in `groupBy` and `pivot` KDocs and website docs
Allex-Nik
commented
May 29, 2026
| * `| `__`.`__[**`percentileBy`**][Pivot.percentileBy]**`(`**`percentile: `[`Double`][Double]**`) { `**`rowExpression: `[`RowExpression`][RowExpression]**` }`** | ||
| * | ||
| * {@include [Indent]} | ||
| * __`.`__[**`with`**][Pivot.with]**` { `**`rowExpression: `[`RowExpression`][RowExpression]**` }`** |
Collaborator
Author
There was a problem hiding this comment.
Should it be on ReducedPivot instead? If we mean the function for the second step of reducing: transform ReducedPivot into a DataRow.
An overload on Pivot also exists though, so I'm not completely sure.
Allex-Nik
commented
May 29, 2026
| * | ||
| * {@include [Indent]} | ||
| * `| `__`.`__[**`medianBy`**][Pivot.medianBy]**` { `**`column: `[`RowExpression`][RowExpression]**` }`** | ||
| * `| `__`.`__[**`medianBy`**][Pivot.medianBy]**` { `**`rowExpression: `[`RowExpression`][RowExpression]**` }`** |
Collaborator
Author
There was a problem hiding this comment.
Should the parameter be called like in the function declaration (rowExpression instead of column)?
Allex-Nik
commented
May 29, 2026
| of the [`row expression`](DataRow.md#row-expressions) supplied to the function. | ||
|
|
||
| * [`medianBy`](median.md) / [`percentileBy`](percentile.md) – to get the row with the value closest to the estimated | ||
| * [`medianBy`](median.md) / [`percentileBy`](percentile.md) – to get the row at the position closest to the estimated |
Collaborator
Author
There was a problem hiding this comment.
@Jolanrensen I think last time I incorrectly implemented what you meant. Does it sound better now? :)
Allex-Nik
commented
May 29, 2026
| * ### Reduce [GroupBy] into [DataFrame] | ||
| * | ||
| * {@include [Indent]} | ||
| * [GroupBy][GroupBy]`.`[**`minBy`**][GroupBy.minBy]**` { `**`column: `[`ColumnSelector`][ColumnSelector]**` }`** |
Collaborator
Author
There was a problem hiding this comment.
Shouldn't it be RowExpression instead of ColumnSelector? Same for maxBy below. If yes, I'll fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1785.
Adds
medianByandpercentileByto the Grammar ofgroupBy.Additionally, introduces a couple of minor fixes:
medianByandpercentileByin thegroupByandpivotKDocs and website docs;medianByandpercentileByin thepivotgrammar.