QuestionQ288

VerifiedDeveloping Apache Spark™ DataFrame/DataSet API Applications

Which of the following operations does not return a DataFrame with duplicate rows removed?

Explanation

In PySpark, dropDuplicates() removes duplicate rows, distinct() returns distinct rows, and drop_duplicates() is an alias for dropDuplicates(). A None subset defaults to all columns. The subset argument is defined as a list of column names, so the string "all" is not the all-columns option and can cause column-resolution or argument handling errors rather than returning the intended deduplicated DataFrame.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!