import csv
def writer_oneRow_toFile(fileName, row):
'''
利用csv库实现数据一行行写入
param: fileName, row
'''
with open(file,'a+',encoding='utf-8',newline='') as csvfile:
spamwriter = csv.writer(csvfile, delimiter='|', quoting=csv.QUOTE_MINIMAL)
spamwriter.writerow(row)
def deleteRepeatData(dataFrame):
'''
去除dataFrame中的重复数据
param: dataFrame
return: dataFrame
'''
return dataFrame.drop_duplicates()