Databricks Certified Associate Developer for Apache Spark — Question 107

The code block shown below contains an error. The code block is intended to return a collection of summary statistics for column sqft in Data Frame storesDF. Identify the error.

Code block:

storesDF.describes(col("sgft "))

Answer options

Correct answer: D

Explanation

The correct answer is D because the describe() function requires a column name as a string rather than a Column object. The other options are incorrect as they misrepresent the functionality of the describe() method or suggest incorrect operations that do not apply to the context of this code block.