其他分享
首页 > 其他分享> > pd.excelwriter参数option encoding

pd.excelwriter参数option encoding

作者:互联网

实际上,有一种方法可以通过向ExcelWriter传递参数来强制使用utf8编码

ew = pandas.ExcelWriter('test.xlsx',options={'encoding':'utf-8'})
 sampleList = ['Miño', '1', '2', 'señora']
 dataframe = pandas.DataFrame(sampleList)
 dataframe.to_excel(ew)
 ew.save()

标签:option,encoding,dataframe,sampleList,pd,ExcelWriter,ew,pandas
来源: https://www.cnblogs.com/xingnie/p/16095093.html