Python-118 删除重复的行delete duplicat
-
1.删除重复行:
-
In the output, we can see that it removes duplicated rows. It is the default behavior of the drop_duplicate() function.
-
It retains the first value and removes further duplicates.
import pandas as pd
data = pd.read_excel('C:\Temp\data.xlsx')# file destination
#print(data)
data.drop_duplicates()
https://www.sqlshack.com/removing-duplicates-in-an-excel-sheet-using-python-scripts/
https://www.sqlshack.com/python-scripts-to-format-data-in-microsoft-excel/
本文标题:Python-118 删除重复的行delete duplicat
本文链接:https://www.haomeiwen.com/subject/razyiltx.html
网友评论