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

Which of the following DataFrame operations is classified as an action?

  • A. DataFrame.drop()
  • B. DataFrame.coalesce()
  • C. DataFrame.take()
  • D. DataFrame.join()
  • E. DataFrame.filter()
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
TmData
Highly Voted 1 year, 5 months ago
Selected Answer: C
The DataFrame operation classified as an action is: C. DataFrame.take() Explanation: In Spark, actions are operations that trigger the execution of transformations on a DataFrame and return results or side effects. Actions are evaluated eagerly, meaning they initiate the execution of the computation plan built by transformations. Among the options provided, DataFrame.take() is an action because it returns an array with the first n elements from the DataFrame as an array. It triggers the execution of any pending transformations and collects the resulting data.
upvoted 5 times
...
Becida
Most Recent 1 month, 3 weeks ago
Selected Answer: C
It returns first n rows of an array
upvoted 1 times
...
SonicBoom10C9
1 year, 6 months ago
Selected Answer: C
DataFrame.take(num: int) → List[pyspark.sql.types.Row] All the other functions return a dataframe again, which is defined as a transformation. An action returns a result of a computation, which take() does.
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 ...