python--pandas将excel转为在线html
时间:2020-04-16 16:34:00
收藏:0
阅读:398
#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
评论(0)