df.to_csv(fpath,index=False,encoding='utf-8-sig')
用这个encoding就行
本文介绍了一种使用Python pandas库将DataFrame对象保存为CSV文件的方法,特别强调了如何正确设置encoding参数以避免乱码问题。
df.to_csv(fpath,index=False,encoding='utf-8-sig')
用这个encoding就行
314
4102

被折叠的 条评论
为什么被折叠?