I need to write a python script that outputs the differences of two csvs into a third csv based on the specific date format, the third csv will hold the differences that are between the two files
#reads both files and puts them into a table
Id = "ID"
Date = "Date"
with open('example.csv', 'r') as t1, open ('example2.csv', 'r') as t2:
t1.write(Id + Date "\n")
t1.close()
t2.write(Id + Date "\n")
t2.close()
fileone = t1.readlines()
filetwo = t2.readlines()
#function to write a third file that outputs differences
with open ('DIFF.csv', 'w') as outfile:
for line in filetwo:
if line not in fileone:
#wr = csv.writer(outfile, dialect='csv')
#wr.writerow([line.rstrip('\n')])
outfile.write(line)
outfile.close()
print("csv is ready")