Hi I am using following code to remove duplicate records from my csv file:
inFile = open('I:\SIT\Monthly\LatestMonthly\source\Network1.csv','r')
outFile = open('I:\SIT\Monthly\LatestMonthly\source\Network2.csv','w')
listLines = []
for line in inFile:
if line in listLines:
continue
else:
outFile.write(line)
listLines.append(line)
outFile.close()
inFile.close()
When I run the script I am getting an error:
unicodeescape' codec can't decode bytes in position 35-36: malformed \N character escape.
Why do I get this error?
for (lineNo,line) in enumerate(inFile): print(lineNo) [...]