Skip to content

Commit e916ab1

Browse files
authored
Create drop-duplicate-rows.py3
1 parent 4ba4500 commit e916ab1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Python3/drop-duplicate-rows.py3

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Time: O(n)
2+
# Space: O(n)
3+
4+
import pandas as pd
5+
6+
7+
# pandas
8+
def dropDuplicateEmails(customers: pd.DataFrame) -> pd.DataFrame:
9+
customers.drop_duplicates(subset=["email"], keep="first", inplace=True)
10+
return customers

0 commit comments

Comments
 (0)