Certified Associate Developer for Apache Spark Exam QuestionsBrowse all questions from this exam

Certified Associate Developer for Apache Spark Exam - Question 115


Which of the following sets of DataFrame methods will both return a new DataFrame only containing rows that meet a specified logical condition?

Show Answer
Correct Answer: C

The DataFrame methods 'filter()' and 'where()' both return a new DataFrame containing only those rows that meet specified logical conditions. 'filter()' is explicitly used for filtering rows based on a given condition, while 'where()' functions similarly by selecting rows that satisfy the given criteria. Neither 'drop()', 'select()', nor any combination of these methods are designed for this purpose.

Discussion

2 comments
Sign in to comment
Sowwy1Option: C
Apr 2, 2024

C is correct

SaiPavan10Option: C
Apr 4, 2024

C is the right choice