flatten
Returns DataFrame
without column groupings under selected columns.
flatten [ { columns } ]
Columns after flattening will keep their original names. Potential column name clashes are resolved by adding minimal possible name prefix from ancestor columns.
// name.firstName -> firstName
// name.lastName -> lastName
df.flatten { name }
val name by columnGroup()
val firstName by name.column<String>()
val lastName by name.column<String>()
// name.firstName -> firstName
// name.lastName -> lastName
df.flatten(name)
// name.firstName -> firstName
// name.lastName -> lastName
df.flatten("name")
To remove all column groupings in DataFrame
, invoke flatten
without parameters:
df.flatten()
Last modified: 27 September 2024