update

fun <T, C> DataFrame<T>.update(columns: ColumnsSelector<T, C>): Update<T, C>

The Update Operation

Returns the DataFrame with changed values in some cells (column types cannot be changed).

Check out: Grammar

For more information: See update on the documentation website.

    

The columns to update need to be selected. See Selecting Columns for all the selecting options.

This Update Overload

Select or express columns using the Columns Selection DSL.

This DSL is initiated by a Columns Selector lambda, which operates in the context of the Columns Selection DSL and expects you to return a SingleColumn or ColumnSet (so, a ColumnsResolver). This is an entity formed by calling any (combination) of the functions in the DSL that is or can be resolved into one or more columns.

The Columns Selection DSL allows using Extension Properties for specifying columns type- and name-safe.

Check out: Columns Selection DSL Grammar

    

See Column Selectors on the documentation website.

For example:

df.update{ length andage }

df.update{ cols(1..5) }

df.update{ colsOf<Double>() }

Parameters

columns

The Columns Selector used to select the columns of this DataFrame to update.


fun <T> DataFrame<T>.update(vararg columns: String): Update<T, Any?>

The Update Operation

Returns the DataFrame with changed values in some cells (column types cannot be changed).

Check out: Grammar

For more information: See update on the documentation website.

    

The columns to update need to be selected. See Selecting Columns for all the selecting options.

This Update Overload

Select single or multiple columns using their names as Strings. (String API).

For example:

df.update("length", "age")

Optional

Combine df.update(...).with{ ... } into df.update(...) { ... }

Parameters

columns

The Strings corresponding to the names of columns belonging to this DataFrame to update.


fun <T> DataFrame<T>.update(firstCol: String, vararg cols: String, expression: UpdateExpression<T, Any?, Any?>): DataFrame<T>

The Update Operation

Returns the DataFrame with changed values in some cells (column types cannot be changed).

Check out: Grammar

For more information: See update on the documentation website.

    

The columns to update need to be selected. See Selecting Columns for all the selecting options.

This Update Overload

This overload is a combination of update and with.

Select single or multiple columns using their names as Strings. (String API).

Provide a new value for every selected cell given its row and its previous value using a row value expression.

For more information, See RowValueExpression on the documentation website.

For example:

df.update("city"){ name.firstName + " from " + it }

df.update("city"){ it.uppercase() }

Parameters

columns

The Strings corresponding to the names of columns belonging to this DataFrame to update.

expression

The Row Value Expression to update the rows with.


fun <T, C> DataFrame<T>.update(vararg columns: KProperty<C>): Update<T, C>

Deprecated

It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html

The Update Operation

Returns the DataFrame with changed values in some cells (column types cannot be changed).

Check out: Grammar

For more information: See update on the documentation website.

    

The columns to update need to be selected. See Selecting Columns for all the selecting options.

This Update Overload

Optional

Combine df.update(...).with{ ... } into df.update(...) { ... }

Parameters

columns

The KProperties corresponding to columns of this DataFrame to update.


fun <T, C> DataFrame<T>.update(vararg columns: ColumnReference<C>): Update<T, C>

Deprecated

It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html

The Update Operation

Returns the DataFrame with changed values in some cells (column types cannot be changed).

Check out: Grammar

For more information: See update on the documentation website.

    

The columns to update need to be selected. See Selecting Columns for all the selecting options.

This Update Overload

Optional

Combine df.update(...).with{ ... } into df.update(...) { ... }

Parameters

columns

The Column References of this DataFrame to update.


fun <T, C> DataFrame<T>.update(firstCol: ColumnReference<C>, vararg cols: ColumnReference<C>, expression: UpdateExpression<T, C, C>): DataFrame<T>

Deprecated

It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html

The Update Operation

Returns the DataFrame with changed values in some cells (column types cannot be changed).

Check out: Grammar

For more information: See update on the documentation website.

    

The columns to update need to be selected. See Selecting Columns for all the selecting options.

This Update Overload

This overload is a combination of update and with.

Provide a new value for every selected cell given its row and its previous value using a row value expression.

For more information, See RowValueExpression on the documentation website.

For example:

df.update("city"){ name.firstName + " from " + it }

df.update("city"){ it.uppercase() }

Parameters

columns

The Column References of this DataFrame to update.

expression

The Row Value Expression to update the rows with.


fun <T, C> DataFrame<T>.update(firstCol: KProperty<C>, vararg cols: KProperty<C>, expression: UpdateExpression<T, C, C>): DataFrame<T>

Deprecated

It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html

The Update Operation

Returns the DataFrame with changed values in some cells (column types cannot be changed).

Check out: Grammar

For more information: See update on the documentation website.

    

The columns to update need to be selected. See Selecting Columns for all the selecting options.

This Update Overload

This overload is a combination of update and with.

Provide a new value for every selected cell given its row and its previous value using a row value expression.

For more information, See RowValueExpression on the documentation website.

For example:

df.update("city"){ name.firstName + " from " + it }

df.update("city"){ it.uppercase() }

Parameters

columns

The KProperties corresponding to columns of this DataFrame to update.

expression

The Row Value Expression to update the rows with.