在jupyter notebook中使用pandas存储数据,然后在jupyter的文件列表中点击该文件,报错了,无法打开
titanic.to_excel('tt.xlsx',sheet_name='pp',index=False)
如图:
提示是编码问题,在保存时试试添加encoding参数,即titanic.to_excel('tt.xlsx',sheet_name='pp',index=False,encoding='utf-8')