You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param columns The [Columns selector DSL][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.Dsl.WithExample] used to select the columns of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
130
130
*/
@@ -202,9 +202,9 @@ public fun <T, C> DataFrame<T>.update(vararg columns: KProperty<C>): Update<T, C
202
202
*
203
203
* For example:
204
204
*
205
-
* `val length by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<Double>()`
205
+
* `val length by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<`[Double][Double]`>()`
206
206
*
207
-
* `val age by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<Double>()`
207
+
* `val age by `[column][org.jetbrains.kotlinx.dataframe.api.column]`<`[Double][Double]`>()`
* Provide a [Collection][Collection]<[Int][Int]> of row indices to update.
277
279
*
278
280
* @param rowIndices The indices of the rows to update. Either a [Collection][Collection]<[Int][Int]>, an [IntRange][IntRange], or just `vararg` indices.
@@ -292,6 +294,7 @@ public fun <T, C> Update<T, C>.at(rowIndices: Collection<Int>): Update<T, C> = w
* Provide a `vararg` of [Ints][Int] of row indices to update.
296
299
*
297
300
* @param rowIndices The indices of the rows to update. Either a [Collection][Collection]<[Int][Int]>, an [IntRange][IntRange], or just `vararg` indices.
@@ -311,6 +314,7 @@ public fun <T, C> Update<T, C>.at(vararg rowIndices: Int): Update<T, C> = at(row
* Provide an [IntRange][IntRange] of row indices to update.
315
319
*
316
320
* @param rowRange The indices of the rows to update. Either a [Collection][Collection]<[Int][Int]>, an [IntRange][IntRange], or just `vararg` indices.
@@ -319,6 +323,7 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
319
323
320
324
/** ## Per Row Col
321
325
* Provide a new value for every selected cell given both its row and column using a [row-column expression][org.jetbrains.kotlinx.dataframe.RowColumnExpression].
326
+
*
322
327
* For example:
323
328
*
324
329
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { age ` { row, col ->`
@@ -327,7 +332,8 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
* - [Update with][org.jetbrains.kotlinx.dataframe.api.Update.with] to provide a new value for every selected cell giving its row.
@@ -362,7 +368,8 @@ public typealias UpdateExpression<T, C, R> = AddDataRow<T>.(C) -> R
362
368
* [update with][org.jetbrains.kotlinx.dataframe.api.Update.with]- and [add][org.jetbrains.kotlinx.dataframe.api.add]-like expressions use [AddDataRow][org.jetbrains.kotlinx.dataframe.api.AddDataRow] instead of [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as the DSL's receiver type.
363
369
* This is an extension to [RowValueExpression][org.jetbrains.kotlinx.dataframe.RowValueExpression] and
364
370
* [RowExpression][org.jetbrains.kotlinx.dataframe.RowExpression] that provides access to
365
-
* the modified/generated value of the preceding row ([AddDataRow.newValue][org.jetbrains.kotlinx.dataframe.api.AddDataRow.newValue]). ## See Also
371
+
* the modified/generated value of the preceding row ([AddDataRow.newValue][org.jetbrains.kotlinx.dataframe.api.AddDataRow.newValue]).
372
+
* ## See Also
366
373
* - [Update per col][org.jetbrains.kotlinx.dataframe.api.Update.perCol] to provide a new value for every selected cell giving its column.
367
374
* - [Update per row col][org.jetbrains.kotlinx.dataframe.api.Update.perRowCol] to provide a new value for every selected cell giving its row and column.
368
375
* @param expression The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
@@ -380,6 +387,7 @@ private interface SeeAlsoWith
380
387
* Updates selected [column group][ColumnGroup] as a [DataFrame] with the given [expression].
381
388
*
382
389
* Provide a new value for every selected data frame using a [dataframe expression][org.jetbrains.kotlinx.dataframe.DataFrameExpression].
* Provide a new value for every selected cell per column using a [Map][Map]`<`[colName: String][String]`, value: C>`
453
462
* or [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as Map.
463
+
*
454
464
* For example:
455
465
*
456
466
* `val defaults = `[mapOf][mapOf]`("name" to "Empty", "age" to 0)`
457
467
*
458
468
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name and age }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { ... }.`[perCol][org.jetbrains.kotlinx.dataframe.api.perCol]`(defaults)`
459
469
*
460
-
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values].
470
+
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values].
471
+
*
461
472
*
462
473
* @param values The [Map]<[String], Value> to provide a new value for every selected cell.
463
474
* For each selected column, there must be a value in the map with the same name.
@@ -480,6 +491,7 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> = up
480
491
* ## This Per Col Overload
481
492
* Provide a new value for every selected cell per column using a [Map][Map]`<`[colName: String][String]`, value: C>`
482
493
* or [DataRow][org.jetbrains.kotlinx.dataframe.DataRow] as Map.
@@ -488,7 +500,8 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> = up
488
500
*
489
501
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { name and age }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { ... }.`[perCol][org.jetbrains.kotlinx.dataframe.api.perCol]`(defaults)`
490
502
*
491
-
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values]. .`[with][org.jetbrains.kotlinx.dataframe.api.Update.with]` { "Empty" }`
503
+
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values][values].
* @param valueSelector The [Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenColumn.ColumnExpression] to provide a new value for every selected cell giving its column.
523
537
*/
@@ -591,10 +605,12 @@ public fun <T, C> Update<T, C?>.notNull(expression: UpdateExpression<T, C, C>):
591
605
* For more information: [See `update` on the documentation website.](https://kotlin.github.io/dataframe/update.html)
592
606
* ##
593
607
* The columns to update need to be selected. See [Selecting Columns][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns] for all the selecting options.
594
-
* ## This Update Overload ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
608
+
* ## This Update Overload
609
+
* ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
595
610
*
596
611
* Select columns using [column accessors][org.jetbrains.kotlinx.dataframe.columns.ColumnReference]
* Provide a new value for every selected cell given its row and its previous value using a
599
615
* [row value expression][org.jetbrains.kotlinx.dataframe.RowValueExpression].
600
616
*
@@ -627,9 +643,11 @@ public fun <T, C> DataFrame<T>.update(
627
643
* For more information: [See `update` on the documentation website.](https://kotlin.github.io/dataframe/update.html)
628
644
* ##
629
645
* The columns to update need to be selected. See [Selecting Columns][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns] for all the selecting options.
630
-
* ## This Update Overload ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
646
+
* ## This Update Overload
647
+
* ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
631
648
*
632
649
* Select columns using [KProperties][KProperty] ([KProperties API][org.jetbrains.kotlinx.dataframe.documentation.AccessApi.KPropertiesApi]).
650
+
*
633
651
* Provide a new value for every selected cell given its row and its previous value using a
634
652
* [row value expression][org.jetbrains.kotlinx.dataframe.RowValueExpression].
635
653
*
@@ -662,10 +680,12 @@ public fun <T, C> DataFrame<T>.update(
662
680
* For more information: [See `update` on the documentation website.](https://kotlin.github.io/dataframe/update.html)
663
681
* ##
664
682
* The columns to update need to be selected. See [Selecting Columns][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns] for all the selecting options.
665
-
* ## This Update Overload ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
683
+
* ## This Update Overload
684
+
* ### This overload is a combination of [update][org.jetbrains.kotlinx.dataframe.api.update] and [with][org.jetbrains.kotlinx.dataframe.api.Update.with].
666
685
*
667
686
* Select columns using their [column names][String]
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withNull][org.jetbrains.kotlinx.dataframe.api.withNull]`()`
731
+
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withNull][org.jetbrains.kotlinx.dataframe.api.withNull]`()`
@@ -719,7 +740,8 @@ public fun <T, C> Update<T, C>.withNull(): DataFrame<T> = with { null }
719
740
*
720
741
* For example:
721
742
*
722
-
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withZero][org.jetbrains.kotlinx.dataframe.api.withZero]`()`
743
+
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withZero][org.jetbrains.kotlinx.dataframe.api.withZero]`()`
@@ -730,7 +752,8 @@ public fun <T, C> Update<T, C>.withZero(): DataFrame<T> = updateWithValuePerColu
730
752
*
731
753
* For example:
732
754
*
733
-
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withValue][org.jetbrains.kotlinx.dataframe.api.withValue]`(-1)`
755
+
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { id }.`[where][org.jetbrains.kotlinx.dataframe.api.Update.where]` { it < 0 }.`[withValue][org.jetbrains.kotlinx.dataframe.api.withValue]`(-1)`
756
+
*
734
757
*
735
758
*
736
759
* @param value The value to set the selected rows to. In contrast to [with][Update.with], this must be the same exact type.
Copy file name to clipboardExpand all lines: core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/ExpressionsGivenDataFrame.kt
Copy file name to clipboardExpand all lines: core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/ExpressionsGivenRow.kt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ import org.jetbrains.kotlinx.dataframe.RowValueExpression as DfRowValueExpressio
26
26
* This is an extension to [RowValueExpression][org.jetbrains.kotlinx.dataframe.RowValueExpression] and
27
27
* [RowExpression][org.jetbrains.kotlinx.dataframe.RowExpression] that provides access to
28
28
* the modified/generated value of the preceding row ([AddDataRow.newValue][org.jetbrains.kotlinx.dataframe.api.AddDataRow.newValue]).
29
+
*
29
30
* A Row Expression is similar to a [Row Condition][org.jetbrains.kotlinx.dataframe.documentation.SelectingRows] but that expects a [Boolean][Boolean] as result.
Copy file name to clipboardExpand all lines: core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/ExpressionsGivenRowAndColumn.kt
* Provide a new value for every selected cell given both its row and column using a [row-column expression][org.jetbrains.kotlinx.dataframe.RowColumnExpression].
0 commit comments