Databricks Certified Associate Developer for Apache Spark — Question 93
The code block shown below should return a collection of summary statistics for column sqft in DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.
Code block:
storesDF.__1__(__2__)
Answer options
- A. 1. summary 2. col("sqft")
- B. 1. describe 2. col("sqft")
- C. 1. summary 2. "sqft"
- D. 1. describe 2. "sqft"
- E. 1. summary 2. "all"
Correct answer: D
Explanation
The correct answer is D because the 'describe' function is used to generate summary statistics for a specified column. Option A and C use 'summary', which is not a valid function in this context, while E uses 'summary' and specifies 'all', which does not target the specific 'sqft' column.