Databricks Certified Associate Developer for Apache Spark — Question 117

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: E

Explanation

The correct answer is E because the describe() function requires a string representing the column name rather than a Column object. Options A, B, C, and D are incorrect as they suggest alternative approaches or options that are not applicable to the requirements of the describe() function.