update
Returns
DataFrame
with changed values in some cells. Column types can not be changed.
update { columns }
[.where { rowCondition } ]
[.at(rowIndices) ]
.with { rowExpression } | .notNull { rowExpression } | .perCol { colExpression } | .perRowCol { rowColExpression } | .withNull() | .withZero() | .asFrame { frameExpression }
rowCondition: DataRow.(OldValue) -> Boolean
rowExpression: DataRow.(OldValue) -> NewValue
colExpression: DataColumn.(DataColumn) -> NewValue
rowColExpression: (DataRow, DataColumn) -> NewValue
frameExpression: DataFrame.(DataFrame) -> DataFrame
See column selectors and row expressions
df.update { age }.with { it * 2 }
df.update { colsOf<String>().recursively() }.with { it.uppercase() }
df.update { weight }.at(1..4).notNull { it / 2 }
df.update { name.lastName and age }.at(1, 3, 4).withNull()