Add KDocs for pivot `with` APIs

Open Beginner friendly
#1,994 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
90/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
kotlin
Domain
documentation

Research direction

Start in core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/with.kt and review all four with overloads. Compare the semantics with the with coverage on pivot.html, including the reduced and non-reduced receiver differences. Done means each overload has concise KDocs describing its expression parameter, pivot-cell aggregation, and DataRow or DataFrame result; no dedicated test file is currently mentioned.

Written by the indexing model from the issue text.

Description

KDocs

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.
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Kotlin/dataframe

All issues in Kotlin/dataframe

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.