Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Databricks Certified Associate Developer for Apache Spark · Databricks
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
- groupBy('dept') groups rows by department, and agg with F.avg('salary') computes the mean salary per group. The alias renames the resulting column to avg_salary. Total would use F.sum, count would use F.count, max would use F.max.