Code Sample, a copy-pastable example if possible
Input file: (content of example
file)
a1 b1 c1 d1
" c y z
a3 b3 c3 d3
" d4 s4 d4
Code:
extb = pd.read_csv('example', encoding='utf8', sep='\t', header=None); extb[:]
Output:
0 1 2 3
0 a1 b1 c1 d1
1 \tc\ty\tz\na3\tb3\tc3\td3\n d4 s4 d4
Expected Output
a1 b1 c1 d1
" c y z
a3 b3 c3 d3
" d4 s4 d4
Question: Can i control input file that have character "
?
Comment From: sinhrks
As described in docstring, double quote is to handle quoted item by default. - http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html
You can do:
import csv
pd.read_csv('example', encoding='utf8', sep='\t', header=None, quoting=csv.QUOTE_NONE)