I have a CSV-file I want to read into a pandas df, but encounter some troubles.
The CSV-file (file.csv) has a structure as following:
header1, header2, header3 "abc, \" hello \" ", 0, "aaa" "abc, \", 0, "aaa" I want the following output:
header1, header2, header3 "abc, hello", 0, aaa abc, 0, aaa If I apply pd.read_csv("file.csv", header=None, escapechar = "\\") I get the following output:
header1 header2 header3 0 abc, " hello " 0.0 "aaa" 1 abc ", 0, aaa" NaN NaN I actually don't care about special characters, comma's etc. I only want the correct values to be in the correct columns as illustrated.
pd.read_csv("file.csv", header=None, escapechar = "\\"). Can you add to your question, a more complete example, the code used and the full traceback error ?