RenameClause
An intermediate class used in the rename operation.
This class itself does not perform any renaming — it is a transitional step before specifying how to rename the selected columns. It must be followed by one of the renaming methods to produce a new DataFrame with renamed columns.
The resulting columns will keep their original values and positions in the DataFrame, but their names will be changed.
Use the following methods to perform the conversion:
to(name)— renames selected columns to the specified names.to { nameExpression }— renames selected columns using a custom expression, which takes the column and its path and returns a new name.toCamelCase()— renames all selected columns tocamelCase.
For more information: See rename on the documentation website.
See Grammar for more details.
Properties
Functions
NOTE: While you can keep using 'into', we recommend using to for better readability and more natural English.
Renames the columns selected with rename by applying the transform expression to each of them. This expression receives the column together with its full path (as ColumnWithPath) and must return the new name for that column. The operation preserves the original columns’ values and their positions within the DataFrame.
Renames the columns selected with rename by applying the transform expression to each of them. This expression receives the column together with its full path (as ColumnWithPath) and must return the new name for that column. The operation preserves the original columns’ values and their positions within the DataFrame.
Renames the columns, previously selected with rename to "camelCase" format.