named

infix fun <T, C : ColumnReference<T>> C.named(name: String): C

Returns a new column reference with the original column values but a new name.

This is useful when you want to specify an existing column (for example, in select, update, or rename operations) but give it a different name in the resulting DataFrame.

Example:

// Select "size" column as "dimensions"
df.select { size named "dimensions" }

For more information: See Rename: named / into on the documentation website.

Return

A new column with the original structure and values but with the specified name.

Parameters

name

The new name to assign to the column.


infix fun <T, C : ColumnReference<T>> C.named(name: KProperty<*>): C
infix fun <T, C : ColumnReference<T>> C.named(name: ColumnAccessor<*>): C

Deprecated

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