Skip to content

Commit 1332e39

Browse files
committed
added missing notNull() case to update kdocs and fixed docs for notNull()
1 parent aa2b554 commit 1332e39

File tree

1 file changed

+18
-1
lines changed
  • core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api

1 file changed

+18
-1
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/update.kt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import org.jetbrains.kotlinx.dataframe.impl.headPlusArray
3232
import org.jetbrains.kotlinx.dataframe.index
3333
import org.jetbrains.kotlinx.dataframe.util.DEPRECATED_ACCESS_API
3434
import kotlin.reflect.KProperty
35+
import org.jetbrains.kotlinx.dataframe.DataColumn
36+
import org.jetbrains.kotlinx.dataframe.api.mean
3537

3638
/**
3739
* ## The Update Operation
@@ -78,6 +80,9 @@ public class Update<T, C>(
7880
* `\[ `__`.`__[**`at`**][Update.at]**`(`**[`rowIndices`][CommonUpdateAtFunctionDoc.RowIndicesParam]**`)`**` ]`
7981
*
8082
* {@include [Indent]}
83+
* `\[ `__`.`__[**`notNull`**][Update.notNull]**`()`**` ]`
84+
*
85+
* {@include [Indent]}
8186
* __`.`__[**`with`**][Update.with]**` { `**[`rowExpression`][ExpressionsGivenRow.RowValueExpression.WithExample]**` }`**
8287
*
8388
* {@include [Indent]}
@@ -403,7 +408,19 @@ internal infix fun <T, C> RowValueFilter<T, C>?.and(other: RowValueFilter<T, C>)
403408
return { thisExp(this, it) && other(this, it) }
404409
}
405410

406-
/** @include [Update.notNull] */
411+
/**
412+
* ## Not Null
413+
* @include [SelectingRows.RowValueCondition]
414+
*
415+
*
416+
* For example:
417+
*
418+
* `df.`[update][update]` { `[colsOf][colsOf]`<`[Int][Int]`?>() }.`[notNull][notNull]`().`[perRowCol][Update.perRowCol]` { row, col ->`
419+
*
420+
* {@include [Indent]}`row\[col\] / col.`[mean][DataColumn.mean]`(skipNA = true)`
421+
*
422+
* `}`
423+
*/
407424
@Interpretable("UpdateNotNullDefault")
408425
public fun <T, C> Update<T, C?>.notNull(): Update<T, C> = where { it != null } as Update<T, C>
409426

0 commit comments

Comments
 (0)