Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Certified Associate Developer for Apache Spark All Questions

View all questions & answers for the Certified Associate Developer for Apache Spark exam

Exam Certified Associate Developer for Apache Spark topic 1 question 102 discussion

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

  • A. The column sqft should be subsetted from DataFrame storesDF prior to computing summary statistics on it alone.
  • B. The describe() operation does not accept a Column object as an argument outside of a sequence — the sequence Seq(col(“sqft”)) should be specified instead.
  • C. The describe()operation doesn’t compute summary statistics for a single column — the summary() operation should be used instead.
  • D. The describe()operation doesn't compute summary statistics for numeric columns — the summary() operation should be used instead.
  • E. The describe()operation does not accept a Column object as an argument — the column name string “sqft” should be specified instead.
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
SaiPavan10
7 months, 3 weeks ago
Selected Answer: E
E is the right choice.
upvoted 2 times
...
Sowwy1
7 months, 4 weeks ago
I think it's E. It should be storesDF.describe("sqft")
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...