toDataFrame
Converts this GroupBy into a DataFrame.
Each row of the resulting DataFrame represents a unique key–group pair: a row from keys and its corresponding group of rows (as DataFrame).
If groupedColumnName is provided, the groups will be stored in a FrameColumn with that name; otherwise, a default name "group" is used.
For more information: See "GroupBy Aggregation" on the documentation website.
See also schema — the schema of this GroupBy as a DataFrame.
Return
A new DataFrame that includes the grouping key columns together with a FrameColumn containing the corresponding groups.
Parameters
groupedColumnName
The name of the column in which to store grouped data; if null, a default name will be used.