实际上,有一种方法可以通过向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()
实际上,有一种方法可以通过向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()