LeetCode solutions

3071. Drop Duplicate Rows

My accepted Python solution to LeetCode problem 3071, Drop Duplicate Rows, running in 275ms.

  • Difficulty: Easy
  • Python
  • Runtime 275ms
  • Memory 67.2MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 275ms, memory 67.2MB, accepted 2026-01-02.

python
import pandas as pd

def dropDuplicateEmails(customers: pd.DataFrame) -> pd.DataFrame:
    return customers.drop_duplicates(subset='email', keep='first')

Source