Add KDocs for DataFrameGet accessors
The file core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/DataFrameGet.kt is almost entirely undocumented — only properties() has a KDoc. Add concise KDocs for the non-deprecated get* accessors, excluding deprecated / @AccessApiOverload overloads.
Already documented (leave as-is)
DataFrame<T>.properties().
Scope — not documented (grouped)
- Paths & columns-with-paths (by selector) —
getColumnsWithPaths, getColumnPath, getColumnPaths, getColumnWithPath.
- Get columns —
getColumns(selector), getColumns(vararg String), getColumnIndex(col).
- Get a single column (
getColumn family) — by name / ColumnPath / index / selector, plus the typed getColumnGroup (index/name/selector), getFrameColumn (path/name), and the *OrNull variant getColumnGroupOrNull(name).
- Get rows —
getRows(range), getRows(indices), getOrNull(index), rows(), rowsReversed().
Out of scope: all deprecated ColumnReference / KProperty overloads of getColumn / getColumnGroup / getColumnGroupOrNull / containsColumn / contains.
KDocs should explain
- What each accessor returns and how its argument is interpreted (by name vs
ColumnPath vs index vs selector) — this is what disambiguates the many same-named overloads.
- Failure vs null behavior: the
getColumn*/getFrameColumn/getColumnGroup accessors throw IllegalArgumentException when not found (with the existing precise messages), while getColumnGroupOrNull / getOrNull return null; getOrNull(index) returns null for out-of-range/negative indices.
- The
.single() accessors (getColumnPath, getColumnWithPath): they expect the selector to resolve to exactly one column and throw otherwise.
rows() vs rowsReversed(): lazy forward/reverse iteration over DataRows.
Recommendations — make these KDocs genuinely useful (for users and for agents reading the source)
- First sentence = the contract, self-contained. IDE quick-doc and LLM/agent context windows both key off the first line. Write "Returns the column at
index as an AnyCol, throwing if out of bounds." — not "Gets a column." Never rely on "see above"; each rendered KDoc must stand alone.
- Always document the failure mode with
@throws. State the exact exception and the condition (IllegalArgumentException when the column/index is absent). For *OrNull accessors say explicitly that they return null instead. Agents pick the right overload from this alone.
- Disambiguate overloads by how the argument selects. With ~7
getColumn overloads sharing a name, the useful information is name vs path vs index vs selector and the return type — lead with that so the reader (human or model) knows which one they want.
- Cross-link with
@see. Pair each throwing accessor with its *OrNull sibling and with the underlying get / getColumnOrNull. Good link graphs are what let an agent traverse the source instead of guessing.
- One minimal example per family, not per overload. Use the canonical
df receiver and a realistic column name; show the resolved type in a comment (// ColumnGroup<*>). Examples are the highest-signal part of a KDoc for both audiences.
- Name the concrete return types with links (
[ColumnGroup], [FrameColumn], [ColumnWithPath]), not just "a column" — resolvable types beat prose for tooling and for agents resolving symbols.
- Call out the non-obvious edge cases the signature can't show:
getColumnPath/getColumnWithPath require a single match; getOrNull tolerates negative indices; getColumns(vararg String) returns them in selector order.
- Don't restate the signature. Add the semantics the types don't convey (interpretation, ordering, laziness, throwing). A KDoc that only re-types the signature is noise for both users and agents.
Acceptance criteria
- All non-deprecated accessors listed under Scope have concise KDocs;
properties() is preserved.
- Each accessor documents its return type/interpretation and its throw-vs-null behavior (
@throws or explicit null).
- Throwing accessors are
@see-linked to their *OrNull counterparts where they exist.
- No documentation is added for deprecated /
@AccessApiOverload overloads.
Add KDocs for
DataFrameGetaccessorsThe file
core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/DataFrameGet.ktis almost entirely undocumented — onlyproperties()has a KDoc. Add concise KDocs for the non-deprecatedget*accessors, excluding deprecated /@AccessApiOverloadoverloads.Already documented (leave as-is)
DataFrame<T>.properties().Scope — not documented (grouped)
getColumnsWithPaths,getColumnPath,getColumnPaths,getColumnWithPath.getColumns(selector),getColumns(vararg String),getColumnIndex(col).getColumnfamily) — byname/ColumnPath/index/ selector, plus the typedgetColumnGroup(index/name/selector),getFrameColumn(path/name), and the*OrNullvariantgetColumnGroupOrNull(name).getRows(range),getRows(indices),getOrNull(index),rows(),rowsReversed().Out of scope: all deprecated
ColumnReference/KPropertyoverloads ofgetColumn/getColumnGroup/getColumnGroupOrNull/containsColumn/contains.KDocs should explain
ColumnPathvs index vs selector) — this is what disambiguates the many same-named overloads.getColumn*/getFrameColumn/getColumnGroupaccessors throwIllegalArgumentExceptionwhen not found (with the existing precise messages), whilegetColumnGroupOrNull/getOrNullreturnnull;getOrNull(index)returnsnullfor out-of-range/negative indices..single()accessors (getColumnPath,getColumnWithPath): they expect the selector to resolve to exactly one column and throw otherwise.rows()vsrowsReversed(): lazy forward/reverse iteration overDataRows.Recommendations — make these KDocs genuinely useful (for users and for agents reading the source)
indexas anAnyCol, throwing if out of bounds." — not "Gets a column." Never rely on "see above"; each rendered KDoc must stand alone.@throws. State the exact exception and the condition (IllegalArgumentExceptionwhen the column/index is absent). For*OrNullaccessors say explicitly that they returnnullinstead. Agents pick the right overload from this alone.getColumnoverloads sharing a name, the useful information is name vs path vs index vs selector and the return type — lead with that so the reader (human or model) knows which one they want.@see. Pair each throwing accessor with its*OrNullsibling and with the underlyingget/getColumnOrNull. Good link graphs are what let an agent traverse the source instead of guessing.dfreceiver and a realistic column name; show the resolved type in a comment (// ColumnGroup<*>). Examples are the highest-signal part of a KDoc for both audiences.[ColumnGroup],[FrameColumn],[ColumnWithPath]), not just "a column" — resolvable types beat prose for tooling and for agents resolving symbols.getColumnPath/getColumnWithPathrequire a single match;getOrNulltolerates negative indices;getColumns(vararg String)returns them in selector order.Acceptance criteria
properties()is preserved.@throwsor explicitnull).@see-linked to their*OrNullcounterparts where they exist.@AccessApiOverloadoverloads.