Say that test.csv
is a file containing the following content.
date,description,id
2014-09-05,"follow best practices to give \"buyers what they want,\" and to ",733
2014-09-06,"whatever",734
The code below raises an exception of ParserError
.
Notice that read_csv works after removing either the escaped double quotes or the comma inside the escaped double quotes.
import pandas as pd
pd.read_csv('test.csv')
Comment From: gfyoung
@dclong : Do read_csv("test.csv", escapechar="\\")
That will tell pandas
NOT to split on that comma.
Comment From: gfyoung
Closing this issue, as there is a valid way to read this file in pandas
already. @dclong : if this method fails for you, let me know, and we can re-open if needed.