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

The code block shown below contains an error. The code block is intended to return a new DataFrame that is the result of a position-wise union between DataFrame storesDF and DataFrame acquiredStoresDF.

  • A. concat(storesDF, acquiredStoresDF)
  • B. storesDF.unionByName(acquiredStoresDF)
  • C. union(storesDF, acquiredStoresDF)
  • D. unionAll(storesDF, acquiredStoresDF)
  • E. storesDF.union(acquiredStoresDF)
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
65bd33e
3 months, 2 weeks ago
The correct method to perform a position-wise union (i.e., a union by name) between two DataFrames in PySpark is `unionByName`. The correct answer is the one that does not perform a position-wise union. The code block that contains an error is: **A. concat(storesDF, acquiredStoresDF)** The `concat` function does not exist in PySpark for DataFrame operations. Instead, you should use `union` or `unionByName`.
upvoted 1 times
...
SaiPavan10
7 months, 3 weeks ago
Selected Answer: E
E is the right choice.
upvoted 1 times
...
newusername
1 year ago
could you please fix the question? It is missing part of it. Though the answer is correct
upvoted 3 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 ...