g2801_2900.s2882_drop_duplicate_rows.solution.py Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leetcode-in-kotlin Show documentation
Show all versions of leetcode-in-kotlin Show documentation
Kotlin-based LeetCode algorithm problem solutions, regularly updated
# #Easy #2023_12_23_Time_405_ms_(97.36%)_Space_60.2_MB_(75.25%)
import pandas as pd
def dropDuplicateEmails(customers: pd.DataFrame) -> pd.DataFrame:
customers.drop_duplicates(subset='email', keep='first', inplace=True)
return customers