Gather
An intermediate class used in the gather operation.
This class itself does not perform the reshaping — it serves as a transitional step before specifying how to structure the gathered data. It must be followed by one of the reshaping methods to produce a new DataFrame with the transformed layout.
Use the following methods to complete the gathering:
into– reshapes into both key and value columns.keysInto– reshapes into a single key column.valuesInto– reshapes into a single value column.
You can also configure the transformation using:
explodeLists– to flatten list values.mapKeys– to transform the generated keys.mapValues– to transform the gathered values.cast– to specify the resulting value type.
This operation is the reverse of pivot.
See Grammar for more details.
Constructors
Properties
Functions
Reshapes the columns previously selected by gather into a new valueColumn, containing the original column values. The key column is omitted.