Databricks Certified Associate Developer for Apache Spark — Question 83
Which of the following operations returns a GroupedData object?
Answer options
- A. DataFrame.GroupBy()
- B. DataFrame.cubed()
- C. DataFrame.group()
- D. DataFrame.groupBy()
- E. DataFrame.grouping_id()
Correct answer: D
Explanation
The correct answer is D, as DataFrame.groupBy() is the method specifically designed to return a GroupedData object. The other options either do not exist or do not serve this purpose, such as DataFrame.GroupBy() which is incorrectly capitalized, and the other methods which have different functionalities.