#encoding:utf-8
import pandas as pd
import codecs
def test19():
xd = pd.ExcelFile(‘b站.xls‘)
df = xd.parse()
with codecs.open(‘1.html‘, ‘w‘, ‘UTF-8‘) as html_file:
html_file.write(df.to_html(header=True, index=False))
原文:https://www.cnblogs.com/zhouzetian/p/12712856.html