Remove rows that repeat exactly

Data framesEasy7 min

Your task

Given contacts with columns email and name, drop rows that duplicate another row across BOTH columns, keeping the first. Return email and name, sorted by email ascending and then name ascending.

Examples

dedupe_rows(contacts: dataframe) -> dataframe
Example 1
Inputdedupe_rows(contacts)
contacts
emailname
a@x.comAnn
b@x.comBob
a@x.comAnn
c@x.comCy
b@x.comBobby
Output
emailname
a@x.comAnn
b@x.comBob
b@x.comBobby
c@x.comCy