Explain the syntax for performing aggregation on a Spark DataFrame in Scala.

bookmark

To perform an aggregation on a Spark DataFrame in Scala, you can use the groupBy and agg methods with the following syntax:

scala val aggregatedDF = df.groupBy("column_name").agg(functions)