Databricks Certified Associate Developer for Apache Spark — Question 30
Which of the following code blocks returns a collection of summary statistics for all columns in
DataFrame storesDF?
Answer options
- A. storesDF.summary("mean")
- B. storesDF.describe(all = True)
- C. storesDF.describe("all")
- D. storesDF.summary("all")
- E. storesDF.describe()
Correct answer: E
Explanation
The correct answer is E, as the describe() function on a DataFrame returns summary statistics for all numeric columns by default. The other options either specify parameters that limit the output or are incorrectly formatted, leading to incomplete results.