I am very new to Python. I want to parse a csv file such that it will recognize quoted values - for example
1997,Ford,E350,\"Super, luxurious truck\"
You have to define the doublequote as the quotechar whithin the csv.reader() statement:
quotechar
csv.reader()
>>> with open(r'') as csv_file: ... reader = csv.reader(csv_file, delimiter=',', quotechar='"') ... print(reader.next()) ... ['1997', 'Ford', 'E350', 'Super, luxurious truck'] >>>