Skip to content

Commit 76c84a3

Browse files
committed
update from master
1 parent 472448a commit 76c84a3

File tree

1 file changed

+36
-35
lines changed
  • core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api

1 file changed

+36
-35
lines changed

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

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.jetbrains.kotlinx.dataframe.api
22

33
import org.jetbrains.kotlinx.dataframe.*
4+
import org.jetbrains.kotlinx.dataframe.ColumnExpression
45
import org.jetbrains.kotlinx.dataframe.api.Update.Usage
56
import org.jetbrains.kotlinx.dataframe.columns.ColumnGroup
67
import org.jetbrains.kotlinx.dataframe.columns.ColumnReference
@@ -60,16 +61,16 @@ public data class Update<T, C>(
6061
/** The columns to update need to be selected. See [Selecting Columns][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns] for all the selecting options. */
6162
public interface Columns
6263

63-
/** @param columns The [Columns selector DSL][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.Dsl.WithExample] used to select the columns of this [DataFrame] to update. */
64+
/** @param [columns\] The [Columns selector DSL][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.Dsl.WithExample] used to select the columns of this [DataFrame] to update. */
6465
internal interface DslParam
6566

66-
/** @param columns The [Column references][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnAccessors.WithExample] of this [DataFrame] to update. */
67+
/** @param [columns\] The [Column references][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnAccessors.WithExample] of this [DataFrame] to update. */
6768
internal interface ColumnAccessorsParam
6869

69-
/** @param columns The [KProperties][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.KProperties.WithExample] corresponding to columns of this [DataFrame] to update. */
70+
/** @param [columns\] The [KProperties][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.KProperties.WithExample] corresponding to columns of this [DataFrame] to update. */
7071
internal interface KPropertiesParam
7172

72-
/** @param columns The [Column names][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnNames.WithExample] belonging to this [DataFrame] to update. */
73+
/** @param [columns\] The [Column names][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnNames.WithExample] belonging to this [DataFrame] to update. */
7374
internal interface ColumnNamesParam
7475
}
7576

@@ -126,7 +127,7 @@ private interface UpdateWithNote
126127
*
127128
* `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]` { `[colsOf][org.jetbrains.kotlinx.dataframe.api.colsOf]`<`[Double][Double]`>() }`
128129
*
129-
* @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+
* @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.
130131
*/
131132
public fun <T, C> DataFrame<T>.update(columns: ColumnsSelector<T, C>): Update<T, C> =
132133
Update(this, null, columns)
@@ -153,7 +154,7 @@ public fun <T, C> DataFrame<T>.update(columns: ColumnsSelector<T, C>): Update<T,
153154
* ## Optional
154155
* Combine `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]`(...).`[with][org.jetbrains.kotlinx.dataframe.api.Update.with]` { ... }`
155156
* into `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]`(...) { ... }`
156-
* @param columns The [Column names][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnNames.WithExample] belonging to this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
157+
* @param [columns] The [Column names][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnNames.WithExample] belonging to this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
157158
*/
158159
public fun <T> DataFrame<T>.update(vararg columns: String): Update<T, Any?> = update { columns.toColumnSet() }
159160

@@ -181,7 +182,7 @@ public fun <T> DataFrame<T>.update(vararg columns: String): Update<T, Any?> = up
181182
* ## Optional
182183
* Combine `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]`(...).`[with][org.jetbrains.kotlinx.dataframe.api.Update.with]` { ... }`
183184
* into `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]`(...) { ... }`
184-
* @param columns The [KProperties][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.KProperties.WithExample] corresponding to columns of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
185+
* @param [columns] The [KProperties][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.KProperties.WithExample] corresponding to columns of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
185186
*/
186187
public fun <T, C> DataFrame<T>.update(vararg columns: KProperty<C>): Update<T, C> = update { columns.toColumnSet() }
187188

@@ -211,7 +212,7 @@ public fun <T, C> DataFrame<T>.update(vararg columns: KProperty<C>): Update<T, C
211212
* ## Optional
212213
* Combine `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]`(...).`[with][org.jetbrains.kotlinx.dataframe.api.Update.with]` { ... }`
213214
* into `df.`[update][org.jetbrains.kotlinx.dataframe.api.update]`(...) { ... }`
214-
* @param columns The [Column references][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnAccessors.WithExample] of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
215+
* @param [columns] The [Column references][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnAccessors.WithExample] of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
215216
*/
216217
public fun <T, C> DataFrame<T>.update(vararg columns: ColumnReference<C>): Update<T, C> =
217218
update { columns.toColumnSet() }
@@ -242,7 +243,7 @@ public fun <T, C> DataFrame<T>.update(columns: Iterable<ColumnReference<C>>): Up
242243
*
243244
*
244245
*
245-
* @param predicate The [row value filter][RowValueFilter] to select the rows to update.
246+
* @param [predicate] The [row value filter][RowValueFilter] to select the rows to update.
246247
*/
247248
public fun <T, C> Update<T, C>.where(predicate: RowValueFilter<T, C>): Update<T, C> =
248249
copy(filter = filter and predicate)
@@ -282,7 +283,7 @@ private interface CommonUpdateAtFunctionDoc {
282283
*
283284
* Provide a [Collection]<[Int]> of row indices to update.
284285
*
285-
* @param rowIndices The indices of the rows to update. Either a [Collection]<[Int]>, an [IntRange], or just `vararg` indices.
286+
* @param [rowIndices] The indices of the rows to update. Either a [Collection]<[Int]>, an [IntRange], or just `vararg` indices.
286287
*/
287288
public fun <T, C> Update<T, C>.at(rowIndices: Collection<Int>): Update<T, C> = where { index in rowIndices }
288289

@@ -302,7 +303,7 @@ public fun <T, C> Update<T, C>.at(rowIndices: Collection<Int>): Update<T, C> = w
302303
*
303304
* Provide a `vararg` of [Ints][Int] of row indices to update.
304305
*
305-
* @param rowIndices The indices of the rows to update. Either a [Collection]<[Int]>, an [IntRange], or just `vararg` indices.
306+
* @param [rowIndices] The indices of the rows to update. Either a [Collection]<[Int]>, an [IntRange], or just `vararg` indices.
306307
*/
307308
public fun <T, C> Update<T, C>.at(vararg rowIndices: Int): Update<T, C> = at(rowIndices.toSet())
308309

@@ -322,7 +323,7 @@ public fun <T, C> Update<T, C>.at(vararg rowIndices: Int): Update<T, C> = at(row
322323
*
323324
* Provide an [IntRange] of row indices to update.
324325
*
325-
* @param rowRange The indices of the rows to update. Either a [Collection]<[Int]>, an [IntRange], or just `vararg` indices.
326+
* @param [rowRange] The indices of the rows to update. Either a [Collection]<[Int]>, an [IntRange], or just `vararg` indices.
326327
*/
327328
public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { index in rowRange }
328329

@@ -331,19 +332,19 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
331332
*
332333
* For example:
333334
*
334-
* `df.`[update][update]` { age ` { row, col ->`
335+
* `df.`[update][update]` { age }.`[perRowCol][perRowCol]` { row, col ->`
335336
*
336337
* `row.age / col.`[mean][org.jetbrains.kotlinx.dataframe.DataColumn.mean]`(skipNA = true)`
337338
*
338339
* `}`
339340
*
340341
*
341-
* .`[perRowCol][perRowCol]}
342+
*
342343
*
343344
* ## See Also
344345
* - [Update with][org.jetbrains.kotlinx.dataframe.api.Update.with] to provide a new value for every selected cell giving its row.
345346
* - [Update per col][org.jetbrains.kotlinx.dataframe.api.Update.perCol] to provide a new value for every selected cell giving its column.
346-
* @param expression The [Row Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRowAndColumn.RowColumnExpression] to provide a new value for every selected cell giving its row and column.
347+
* @param [expression] The [Row Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRowAndColumn.RowColumnExpression] to provide a new value for every selected cell giving its row and column.
347348
*/
348349
public fun <T, C> Update<T, C>.perRowCol(expression: RowColumnExpression<T, C, C>): DataFrame<T> =
349350
updateImpl { row, column, _ -> expression(row, column) }
@@ -377,7 +378,7 @@ public typealias UpdateExpression<T, C, R> = AddDataRow<T>.(C) -> R
377378
* ## See Also
378379
* - [Update per col][org.jetbrains.kotlinx.dataframe.api.Update.perCol] to provide a new value for every selected cell giving its column.
379380
* - [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.
380-
* @param expression The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
381+
* @param [expression] The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
381382
*/
382383
public fun <T, C> Update<T, C>.with(expression: UpdateExpression<T, C, C?>): DataFrame<T> =
383384
updateImpl { row, _, value ->
@@ -397,7 +398,7 @@ private interface SeeAlsoWith
397398
*
398399
* `df.`[update][update]` { name ` { `[select][org.jetbrains.kotlinx.dataframe.DataFrame.select]` { lastName } }`
399400
* .`[asFrame][asFrame]}
400-
* @param expression The [Data Frame Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenDataFrame.DataFrameExpression] to replace the selected column group with.
401+
* @param [expression] The [Data Frame Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenDataFrame.DataFrameExpression] to replace the selected column group with.
401402
*/
402403
public fun <T, C, R> Update<T, DataRow<C>>.asFrame(expression: DataFrameExpression<C, DataFrame<R>>): DataFrame<T> =
403404
asFrameImpl(expression)
@@ -447,7 +448,7 @@ private interface UpdatePerColMap
447448
*
448449
* `df.`[update][update]` { name and age }.`[where][Update.where]` { ... }.`[perCol][perCol]`(defaults)`
449450
*
450-
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values\].
451+
* @throws [IllegalArgumentException] if a value for a selected cell's column is not defined in [values\].
451452
*/
452453
private interface CommonUpdatePerColMapDoc
453454

@@ -472,10 +473,10 @@ private interface CommonUpdatePerColMapDoc
472473
*
473474
* `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)`
474475
*
475-
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values].
476+
* @throws [IllegalArgumentException] if a value for a selected cell's column is not defined in [values].
476477
*
477478
*
478-
* @param values The [Map]<[String], Value> to provide a new value for every selected cell.
479+
* @param [values] The [Map]<[String], Value> to provide a new value for every selected cell.
479480
* For each selected column, there must be a value in the map with the same name.
480481
*/
481482
public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> = updateWithValuePerColumnImpl {
@@ -501,18 +502,18 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> = up
501502
*
502503
* `val defaults = df.`[getRows][DataFrame.getRows]`(`[listOf][listOf]`(0))`
503504
*
504-
* `.`[update][update]` { name `
505+
* `.`[update][update]` { name }.`[with][Update.with]` { "Empty" }`
505506
*
506-
* `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)`
507+
* `.`[update][update]` { age }.`[with][Update.with]` { 0 }`
507508
*
508-
* @throws IllegalArgumentException if a value for a selected cell's column is not defined in [values].
509-
* .`[with][Update.with]` { "Empty" }`
509+
* `.first()`
510510
*
511-
* `.`[update][update]` { age }.`[with][Update.with]` { 0 }`
511+
* `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)`
512+
*
513+
* @throws [IllegalArgumentException] if a value for a selected cell's column is not defined in [values].
512514
*
513-
* `.first()}
514515
*
515-
* @param values The [DataRow] to provide a new value for every selected cell.
516+
* @param [values] The [DataRow] to provide a new value for every selected cell.
516517
*/
517518
public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(values.toMap() as Map<String, C>)
518519

@@ -538,7 +539,7 @@ public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(val
538539
*
539540
* .`[perCol][perCol]}
540541
*
541-
* @param valueSelector The [Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenColumn.ColumnExpression] to provide a new value for every selected cell giving its column.
542+
* @param [valueSelector] The [Column Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenColumn.ColumnExpression] to provide a new value for every selected cell giving its column.
542543
*/
543544
public fun <T, C> Update<T, C>.perCol(valueSelector: ColumnExpression<C, C>): DataFrame<T> =
544545
updateWithValuePerColumnImpl(valueSelector)
@@ -627,8 +628,8 @@ public fun <T, C> Update<T, C?>.notNull(expression: UpdateExpression<T, C, C>):
627628
*
628629
*
629630
*
630-
* @param columns The [Column references][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnAccessors.WithExample] of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
631-
* @param expression The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
631+
* @param [columns] The [Column references][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnAccessors.WithExample] of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
632+
* @param [expression] The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
632633
*/
633634
public fun <T, C> DataFrame<T>.update(
634635
firstCol: ColumnReference<C>,
@@ -664,8 +665,8 @@ public fun <T, C> DataFrame<T>.update(
664665
*
665666
*
666667
*
667-
* @param columns The [KProperties][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.KProperties.WithExample] corresponding to columns of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
668-
* @param expression The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
668+
* @param [columns] The [KProperties][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.KProperties.WithExample] corresponding to columns of this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
669+
* @param [expression] The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
669670
*/
670671
public fun <T, C> DataFrame<T>.update(
671672
firstCol: KProperty<C>,
@@ -702,8 +703,8 @@ public fun <T, C> DataFrame<T>.update(
702703
*
703704
*
704705
*
705-
* @param columns The [Column names][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnNames.WithExample] belonging to this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
706-
* @param expression The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
706+
* @param [columns] The [Column names][org.jetbrains.kotlinx.dataframe.documentation.SelectingColumns.ColumnNames.WithExample] belonging to this [DataFrame][org.jetbrains.kotlinx.dataframe.DataFrame] to update.
707+
* @param [expression] The [Row Value Expression][org.jetbrains.kotlinx.dataframe.documentation.ExpressionsGivenRow.RowValueExpression.WithExample] to update the rows with.
707708
*/
708709
public fun <T> DataFrame<T>.update(
709710
firstCol: String,
@@ -761,6 +762,6 @@ public fun <T, C> Update<T, C>.withZero(): DataFrame<T> = updateWithValuePerColu
761762
*
762763
*
763764
*
764-
* @param value The value to set the selected rows to. In contrast to [with][Update.with], this must be the same exact type.
765+
* @param [value] The value to set the selected rows to. In contrast to [with][Update.with], this must be the same exact type.
765766
*/
766767
public fun <T, C> Update<T, C>.withValue(value: C): DataFrame<T> = with { value }

0 commit comments

Comments
 (0)