【错误】_csv.Error: need to escape, but no escapechar set

运行

train.to_csv(train_path, sep='\t', escapechar='\\', index=False, header=False, doublequote=False)

出现如下错误


File "pandas/_libs/writers.pyx", line 72, in pandas._libs.writers.write_csv_rows<br />_csv.Error: need to escape, but no escapechar set

解决方法:

rain.to_csv(train_path, sep='\t', escapechar='\\', index=False, header=False, doublequote=False)

posted @ 2023-03-20 17:09  地球美好不  阅读(1355)  评论(1)    收藏  举报