保存文件时如何解决错误

时间:2019-07-06 04:15:05

标签: python-3.x dataframe syntax

在保存文件时如何解决错误?我在下面给出代码

df12.to_csv("C:\python\catboost\xt.csv", encoding = 'cp1251', sep = ';')

File "<ipython-input-58-d3c2f3860970>", line 2
    df12.to_csv("C:\python\catboost\xt.csv", encoding = 'cp1251', sep = ';')
               ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 18-19: truncated \xXX escape

0 个答案:

没有答案