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

Which of the following code blocks returns all the rows from DataFrame storesDF?

  • A. storesDF.head()
  • B. storesDF.collect()
  • C. storesDF.count()
  • D. storesDF.take()
  • E. storesDF.show()
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
4be8126
Highly Voted 1 year, 7 months ago
Selected Answer: B
Answer: B Explanation: head() returns the first n rows of the DataFrame. By default, it returns the first 5 rows. collect() returns an array of Row objects that represent the entire DataFrame. count() returns the number of rows in the DataFrame. take(n) returns the first n rows of the DataFrame as an array of Row objects. show() prints the first 20 rows of the DataFrame in a tabular form. Only collect() returns all the rows from the DataFrame.
upvoted 5 times
...
mahmoud_salah30
Most Recent 11 months ago
b correct
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 ...