Command
df.groupBy("col")Explanation
Used for aggregation on grouped data.
Examples
Count rows per department
df.groupBy("dept").count().show()df.groupBy("col")Used for aggregation on grouped data.
Count rows per department
df.groupBy("dept").count().show()