Add KDocs for pivot with APIs
The file core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/with.kt has no KDocs at all. Please add concise KDocs for all four functions.
Scope
All four are the pivot aggregation with(expression):
Pivot<T>.with(expression: RowExpression<T, V>): DataRow<T>
ReducedPivot<T>.with(expression: RowExpression<T, V>): DataRow<T>
PivotGroupBy<T>.with(expression: RowExpression<T, V>): DataFrame<T>
ReducedPivotGroupBy<T>.with(expression: RowExpression<T, V>): DataFrame<T>
KDocs should explain
- What
with does: it is a pivot aggregation terminal that fills each pivot cell with the value produced by evaluating expression on the group's rows — the result value type V is captured via the reified type argument.
- The receiver differences and result shape:
Pivot / ReducedPivot produce a single DataRow<T> (one value per pivot column);
PivotGroupBy / ReducedPivotGroupBy produce a DataFrame<T> (a value per group × pivot column);
- the
Reduced* variants evaluate the expression on the single reduced row of each group/cell, the non-reduced variants over the whole group.
- The
expression parameter: a RowExpression<T, V> evaluated per group; note (for ReducedPivotGroupBy) that returning a column reference resolves to that column's value.
Test coverage assessment
- There is no dedicated test file for
with.kt. Optional follow-up: cover each receiver variant and the reduced-vs-non-reduced behavior.
Website coverage
with is covered on pivot.html (as a pivot aggregation step); keep KDocs consistent with it.
Acceptance criteria
- All four
with overloads have concise KDocs.
- KDocs state the pivot-aggregation semantics, the
DataRow vs DataFrame result per receiver, and the reduced-vs-non-reduced distinction.
- Docs are consistent with the site page
pivot.html.
Add KDocs for pivot
withAPIsThe file
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/with.kthas no KDocs at all. Please add concise KDocs for all four functions.Scope
All four are the pivot aggregation
with(expression):Pivot<T>.with(expression: RowExpression<T, V>): DataRow<T>ReducedPivot<T>.with(expression: RowExpression<T, V>): DataRow<T>PivotGroupBy<T>.with(expression: RowExpression<T, V>): DataFrame<T>ReducedPivotGroupBy<T>.with(expression: RowExpression<T, V>): DataFrame<T>KDocs should explain
withdoes: it is a pivot aggregation terminal that fills each pivot cell with the value produced by evaluatingexpressionon the group's rows — the result value typeVis captured via the reified type argument.Pivot/ReducedPivotproduce a singleDataRow<T>(one value per pivot column);PivotGroupBy/ReducedPivotGroupByproduce aDataFrame<T>(a value per group × pivot column);Reduced*variants evaluate the expression on the single reduced row of each group/cell, the non-reduced variants over the whole group.expressionparameter: aRowExpression<T, V>evaluated per group; note (forReducedPivotGroupBy) that returning a column reference resolves to that column's value.Test coverage assessment
with.kt. Optional follow-up: cover each receiver variant and the reduced-vs-non-reduced behavior.Website coverage
withis covered onpivot.html(as a pivot aggregation step); keep KDocs consistent with it.Acceptance criteria
withoverloads have concise KDocs.DataRowvsDataFrameresult per receiver, and the reduced-vs-non-reduced distinction.pivot.html.