Exam Certified Associate Developer for Apache Spark All QuestionsBrowse all questions from this exam
Question 101

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”))

    Correct Answer: E

    The error in the code block is that the describe() operation does not accept a Column object as an argument. Instead, you should specify the column name as a string directly. The corrected code should be storesDF.describe('sqft').

Discussion
SaiPavan10Option: E

E is the right choice.

Sowwy1Option: E

I think it's E. It should be storesDF.describe("sqft")