I would like some help with writing a .dat file using pd.to_csv.
The line I use is as follows and it works without any syntax error.
df.to_csv(file_name+'.dat',header= False,index= False,quotechar='"',quoting=csv.QUOTE_NONE,escapechar='\',doublequote= False)
When I open the output file, the issue shows up here.
Created this data using excel\, sql\, matlab.
What I want is:
Created this data using excel, sql, matlab.
When I tried removing the escapechar field in to_csv
it gives an error.
I also thought I could use escapechar = '\'
but that didn’t work either.
df.to_csv(file_name+'.dat',header= False,index= False,quotechar='"',quoting=csv.QUOTE_NONE,escapechar='\',doublequote= False)
1