Add KDocs for function `Split`
@AndreiKingsley is already working on this.
Since Oct 2, 2025.
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Add KDocs for non-deprecated split APIs
The file core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/split.kt holds the public split operation and its Split.* / SplitWithTransform.* builder chain. Almost all of it is undocumented — only Split.by(regex) and Split.match(...) currently have KDocs.
Please add concise KDocs for the current non-deprecated APIs only. Deprecated and binary-compatibility (@AccessApiOverload, string-ReplaceWith) overloads are out of scope.
Scope
Non-deprecated APIs in split.kt, by stage of the chain:
- Entry points —
DataFrame.split(...)(selector andvararg String) andDataColumn<Iterable<*>>.splitInto(...). - Builder types — the
Split<T, C>class (incl.cast()), theSplitWithTransform<T, C, R>class, and theColumnNamesGeneratortypealias. Split.*configuration —by(...)(char / string delimiters, iterable transform; theregexoverload is already documented),default(...),match(...)(already documented).SplitWithTransform.*/Split.*terminals (produce aDataFrame) —into(...),inward(...),intoColumns(),intoRows(...),inplace(), andSplitWithTransform.default(...).
Out of scope: all deprecated / @AccessApiOverload overloads, the already-documented Split.by(regex) and Split.match(...), and internal/@PublishedApi helpers.
KDocs should explain
- The overall flow:
split { columns }selects columns to split → an optionalby/match/defaultstep defines how each value is split into parts → a terminal (into/inward/intoColumns/intoRows/inplace) decides where the parts go. - What each terminal produces:
into(...)— new sibling columns named bynames(withextraNamesGeneratorfor the overflow);inward(...)— the same, but nested inside a column group under the source column;intoColumns()— splits a column ofDataFrame/rows into columns of a group;intoRows(...)— explodes each split into separate rows (dropEmptybehavior);inplace()— keeps the parts as aListin the original column.
- How replacement column names are chosen: given
names, thenextraNamesGenerator, then the auto-generatedsplitNfallback (see the existingby(regex)example). by/matchsemantics:bysplits by delimiters / a custom transform;matchextracts regex capturing groups;defaultsupplies a value for missing parts.- That entry points return a lazy
Splitbuilder (no work until a terminal is called), andcast()only refines the generic type.
Acceptance criteria
- Every public, non-deprecated declaration in
split.kthas a concise KDoc (the file is fully covered), including theSplitandSplitWithTransformclasses and theColumnNamesGeneratortypealias. - No documentation is added for deprecated or
@AccessApiOverloadoverloads. - KDocs distinguish the terminals (
intovsinwardvsintoColumnsvsintoRowsvsinplace) and their resulting shape. - KDocs explain the
names/extraNamesGeneratornaming logic. - Style and cross-references are consistent with the existing
Split.by(regex)/Split.matchKDocs and with the site docs atsplit.html.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.