
Answer-first summary for fast verification
Answer: filter(), where()
The question asks for sets of DataFrame methods that both return a new DataFrame containing only rows meeting a specified logical condition. Here's the analysis: - **filter()** and **where()** are aliases in Spark and both filter rows based on a condition, making them correct. - **select()** is used to choose columns, not filter rows, so any option with select() (B, D) is incorrect. - **drop()** removes columns, not rows, so options including drop() (A, E) are also incorrect. Thus, the only correct set is **C (filter(), where())**, as both methods perform row filtering.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.