
Answer-first summary for fast verification
Answer: storesDF.describe()
The question asks which code blocks return summary statistics for all columns in the DataFrame `storesDF`. The `describe()` method in Spark, when called without arguments (option E), computes count, mean, stddev, min, and max for all columns. Other options are incorrect: `summary("mean")` (A) returns only the mean, `describe(all=True)` (B) and `describe("all")` (C) use invalid parameters, and `summary("all")` (D) is invalid as "all" isn't a valid statistic. Thus, only option E is correct.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.