0

If I sort a dataframe in descending ortder based on a column. And then drop the duplicates using df.dropDuplicate then which element will be removed? The element which was smaller based on sort?

Abhishek Tripathi
  • 1,211
  • 2
  • 15
  • 30

1 Answers1

0

DropDuplicate method preserves the first Element and removing the others.

So yes , on descending sort only the largest(based on sort) will be preserved and others removed.

Neetika
  • 41,966
  • 1
  • 11
  • 7