Kotlin / Kotlin/dataframe

Add KDocs for `map.kt` APIs

Open
#1,941 0 comments 0 reactions 1 assignee Claimed by @zaleslaw View on GitHub
KDocs
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

# Add missing KDocs for public APIs in `map.kt`

## Motivation

`core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/map.kt` contains several public APIs without KDocs. Some of them are marked with `@Interpretable`, so their expected behavior should be documented explicitly for users and for consistency with other DataFrame operations.

The main source of confusion is that these APIs share the `map` naming but return different shapes:

- `DataColumn.map` / `mapIndexed` return a `DataColumn`
- `DataFrame.map` returns a `List`
- `mapToColumn` creates a computed `DataColumn`
- `mapToFrame` builds a new `DataFrame`
- `GroupBy.map` / `mapToRows` / `mapToFrames` operate on grouped data

KDocs should make those differences clear without duplicating full website documentation.

## Scope

Add or improve KDocs for:

- `DataFrame.map`
- `DataFrame.mapToColumn`
- `ColumnsContainer.mapToColumn`
- `DataFrame.mapToFrame`
- `GroupBy.map`
- `GroupBy.mapToRows`
- `GroupBy.mapToFrames`

Also check and document or improve:

- `DataColumn.map`
- `DataColumn.map(type: KType, ...)`
- `DataColumn.mapIndexed`
- `DataColumn.mapIndexed(type: KType, ...)`

Explicit `KType` overloads should explain how the provided type is used for the resulting column.

## Acceptance Criteria

- Public APIs in `map.kt` have concise KDocs.
- `@Interpretable` APIs have documented behavior and parameters.
- Explicit `KType` overloads explain how the provided type is used.
- KDocs clearly state what each API maps over and what it returns.
- Existing examples/docs for `map`, `mapToColumn`, and `mapToFrame` remain consistent with the new KDocs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.