Exception in documentation example of `maxByOrNull`
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
In [Operations/Access/Get Rows](https://kotlin.github.io/dataframe/getrow.html) we have:
```
df.maxByOrNull { weight }
```
Executing this in a Kotlin Notebook cell results in: `Type mismatch: inferred type is Int? but Int was expected`
Gradle settings:
```
plugins {
kotlin("jvm") version "2.2.20-Beta1"
kotlin("plugin.dataframe") version "2.2.20-Beta1"
}
dependencies {
implementation("org.jetbrains.kotlinx:dataframe:1.0.0-Beta2")
testImplementation(kotlin("test"))
}
```
Contributor guide
Research direction
Open the Operations/Access/Get Rows page linked in the issue and reproduce the maxByOrNull example in a Kotlin Notebook using the provided Gradle settings. Update the documentation example so it executes without the reported type mismatch, then rerun the example to verify it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100