Databricks Certified Associate Developer for Apache Spark — Question 131

Which of the following code blocks returns a new Data Frame from DataFrame storesDF with no duplicate rows?

Answer options

Correct answer: E

Explanation

The correct answer is E, as the dropDuplicates() method effectively removes duplicate rows from a DataFrame. The other options either do not exist as valid methods (A, B, C, D) or are incorrect in their functionality.