I am trying to read a pipe separated csv file using python read_csv()
but it is incorrectly detecting the double quotes in the first field. I know it has something to do with csv reader flags but unable to figure it out.
CODE
with open('Find_File.dat', 'r') as csvfile:
myfile=csv.reader(csvfile,escapechar=" ' ",quoting=csv.QUOTE_NONE,quotechar="'",doublequote=True)
for row in myfile:
data.append(row)
print(data[0])
EXPECTED OUTPUT
["TCC Record Identifier"|"UserName"|"Candidate ID"|"Experience"|"Job Sequence"|"Current 10"|"Ending Rate of Pay 10"]
ACTUAL OUTPUT
['TCC Record Identifier|"UserName"|"Candidate ID"|"Experience"|"Job Sequence"|"Current 10"|"Ending Rate of Pay 10" ']