我怕自己忘记了---
import pandas as pd
frame = pd.read_csv(csv文件, engine='python',encoding='utf-8-sig')
data = frame.drop_duplicates(subset=None, keep='first', inplace=False)
data.to_csv(csv文件, encoding='utf8', index=None)
行去重,并且去除索引。但是第一行会出问题待研究。
import pandas as pd
frame = pd.read_csv(csv文件, engine='python',encoding='utf-8-sig')
data = frame.drop_duplicates(subset=None, keep='first', inplace=False)
data.to_csv(csv文件, encoding='utf8', index=None)
行去重,并且去除索引。但是第一行会出问题待研究。