Command
df.agg()Explanation
Perform aggregations on DataFrames.
Examples
Average salary per department
df.groupBy("dept").agg({"salary":"avg"}).show()df.agg()Perform aggregations on DataFrames.
Average salary per department
df.groupBy("dept").agg({"salary":"avg"}).show()