Keep the First Email Record
Each record has name and email. Remove duplicate email addresses with Pandas, keeping the first record for each email in original row order. Compare email strings exactly, including case. Return a list of dictionaries with name and email. Empty input returns an empty list.
Difficulty: beginner
Show hint
Use drop_duplicates(subset=["email"], keep="first"). Duplicates depend on email, even when the names differ.
Examples
[[{"name":"Asha","email":"[email protected]"},{"name":"Updated","email":"[email protected]"},{"name":"Ben","email":"[email protected]"}]][{"name":"Asha","email":"[email protected]"},{"name":"Ben","email":"[email protected]"}]