@@ -206,6 +206,7 @@ public fun <T, C> DataFrame<T>.update(vararg columns: ColumnReference<C>): Updat
206
206
*
207
207
* @param [predicate] The [row value filter][RowValueFilter] to select the rows to update.
208
208
*/
209
+ @Interpretable(" UpdateWhere" )
209
210
public fun <T , C > Update <T , C >.where (predicate : RowValueFilter <T , C >): Update <T , C > =
210
211
Update (df = df, filter = filter and predicate, columns = columns)
211
212
@@ -236,6 +237,7 @@ private interface CommonUpdateAtFunctionDoc {
236
237
*
237
238
* @param [rowIndices] {@include [CommonUpdateAtFunctionDoc.RowIndicesParam]}
238
239
*/
240
+ @Interpretable(" UpdateAt" )
239
241
public fun <T , C > Update <T , C >.at (rowIndices : Collection <Int >): Update <T , C > = where { index in rowIndices }
240
242
241
243
/* *
@@ -245,6 +247,7 @@ public fun <T, C> Update<T, C>.at(rowIndices: Collection<Int>): Update<T, C> = w
245
247
*
246
248
* @param [rowIndices] {@include [CommonUpdateAtFunctionDoc.RowIndicesParam]}
247
249
*/
250
+ @Interpretable(" UpdateAt" )
248
251
public fun <T , C > Update <T , C >.at (vararg rowIndices : Int ): Update <T , C > = at(rowIndices.toSet())
249
252
250
253
/* *
@@ -254,6 +257,7 @@ public fun <T, C> Update<T, C>.at(vararg rowIndices: Int): Update<T, C> = at(row
254
257
*
255
258
* @param [rowRange] {@include [CommonUpdateAtFunctionDoc.RowIndicesParam]}
256
259
*/
260
+ @Interpretable(" UpdateAt" )
257
261
public fun <T , C > Update <T , C >.at (rowRange : IntRange ): Update <T , C > = where { index in rowRange }
258
262
259
263
/* * ## Per Row Col
@@ -265,6 +269,7 @@ public fun <T, C> Update<T, C>.at(rowRange: IntRange): Update<T, C> = where { in
265
269
* - {@include [SeeAlsoUpdatePerCol]}
266
270
* @param [expression] The {@include [ExpressionsGivenRowAndColumn.RowColumnExpressionLink]} to provide a new value for every selected cell giving its row and column.
267
271
*/
272
+ @Interpretable(" UpdatePerRowCol" )
268
273
public inline fun <T , C > Update <T , C >.perRowCol (crossinline expression : RowColumnExpression <T , C , C >): DataFrame <T > =
269
274
updateImpl { row, column, _ -> expression(row, column) }
270
275
@@ -354,6 +359,7 @@ private interface CommonUpdatePerColMapDoc
354
359
* @param [values] The [Map]<[String], Value> to provide a new value for every selected cell.
355
360
* For each selected column, there must be a value in the map with the same name.
356
361
*/
362
+ @Interpretable(" UpdatePerColMap" )
357
363
public fun <T , C > Update <T , C >.perCol (values : Map <String , C >): DataFrame <T > =
358
364
updateWithValuePerColumnImpl {
359
365
values[it.name()] ? : throw IllegalArgumentException (" Update value for column ${it.name()} is not defined" )
@@ -371,6 +377,7 @@ public fun <T, C> Update<T, C>.perCol(values: Map<String, C>): DataFrame<T> =
371
377
*
372
378
* @param [values] The [DataRow] to provide a new value for every selected cell.
373
379
*/
380
+ @Interpretable(" UpdatePerColRow" )
374
381
public fun <T , C > Update <T , C >.perCol (values : AnyRow ): DataFrame <T > = perCol(values.toMap() as Map <String , C >)
375
382
376
383
/* *
@@ -380,6 +387,7 @@ public fun <T, C> Update<T, C>.perCol(values: AnyRow): DataFrame<T> = perCol(val
380
387
*
381
388
* @param [valueSelector] The {@include [ExpressionsGivenColumn.ColumnExpressionLink]} to provide a new value for every selected cell giving its column.
382
389
*/
390
+ @Interpretable(" UpdatePerCol" )
383
391
public fun <T , C > Update <T , C >.perCol (valueSelector : ColumnExpression <C , C >): DataFrame <T > =
384
392
updateWithValuePerColumnImpl(valueSelector)
385
393
@@ -395,6 +403,7 @@ internal infix fun <T, C> RowValueFilter<T, C>?.and(other: RowValueFilter<T, C>)
395
403
}
396
404
397
405
/* * @include [Update.notNull] */
406
+ @Interpretable(" UpdateNotNullDefault" )
398
407
public fun <T , C > Update <T , C ?>.notNull (): Update <T , C > = where { it != null } as Update <T , C >
399
408
400
409
/* *
@@ -418,6 +427,7 @@ public fun <T, C> Update<T, C?>.notNull(): Update<T, C> = where { it != null } a
418
427
* {@comment No brackets around `expression` because this doc is copied to [Update.notNull]}
419
428
* @param expression Optional {@include [ExpressionsGivenRow.RowExpressionLink]} to update the rows with.
420
429
*/
430
+ @Interpretable(" UpdateNotNull" )
421
431
public fun <T , C > Update <T , C ?>.notNull (expression : UpdateExpression <T , C , C >): DataFrame <T > =
422
432
notNull().with (expression)
423
433
0 commit comments