Dataframe 0.15 Help

rename

Renames one or several columns without changing its location in DataFrame.

df.rename { columns }.into(name) df.rename { columns }.into { nameExpression } nameExpression = (DataColumn) -> String
df.rename { name }.into("fullName")
val name by columnGroup() df.rename(name).into("fullName")
df.rename("name").into("fullName")
df.rename { age }.into { val mean = it.data.mean() "age [mean = $mean]" }
val age by column<Int>() df.rename(age).into { val mean = it.data.mean() "age [mean = $mean]" }
df.rename("age").into { val mean = it.data.cast<Int>().mean() "age [mean = $mean]" }
Last modified: 09 December 2024