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 152 discussion

The code block shown below should return a new DataFrame where column productСategories only has one word per row, resulting in a DataFrame with many more rows than DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.

A sample of storesDF is displayed below:



Code block:

storesDF.__1__(__2__, __3__(__4__(__5__)))

  • A. 1. newColumn
    2. "productCategories"
    3. col
    4. split
    5. "productCategories"
  • B. 1. withColumn
    2. "productCategory"
    3. split
    4. col
    5. "productCategories"
  • C. 1. withColumn
    2. "productCategory"
    3. explode
    4. col
    5. "productCategories"
  • D. 1. newColumn
    2. "productCategory"
    3. explode
    4. col
    5. "productCategories"
  • E. 1. withColumn
    2. "productCategories"
    3. explode
    4. col
    5. "productCategories"
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
oussa_ama
3 months ago
Selected Answer: E
productCategories
upvoted 1 times
...
5effea7
4 months, 2 weeks ago
Selected Answer: E
The answer is E. If you feel like getting in an argument with the question on the proper use of plural field names, then pick C.
upvoted 1 times
...
deadbeef38
5 months ago
Selected Answer: C
new column should be "productCategory" singular
upvoted 2 times
deadbeef38
5 months ago
ok, that wasn't in the spec, but it should have been. I guess E is ok then.
upvoted 1 times
...
...
Sowwy1
7 months, 2 weeks ago
E. 1. withColumn 2. "productCategories" 3. explode 4. col 5. "productCategories"
upvoted 1 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 ...