intoIndexed
Moves columns, previously selected with move into a new position specified by a given column path within the DataFrame. Provides selected column indices.
If the specified path is partially or fully missing — that is, if any segment of the path does not correspond to an existing column or column group — all missing parts will be created automatically.
See Selecting Columns.
For more information: See move on the documentation website.
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.
Examples:
df.move { cols { it.name == "user" } }
.intoIndexed { it, index -> "allUsers"["user$index"] }Parameters
The Column With Path Selector And Indices used to specify a path in the DataFrame to move columns.