Ultimate access to all questions.
Which of the following code blocks returns summary statistics for all columns in the DataFrame storesDF
?
Explanation:
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.