如下所示:
#!/usr/bin/env Python# coding=utf-8import pandas as pdimport codecsxd = pd.ExcelFile('/Users/wangxingfan/Desktop/1.xlsx')df = xd.parse()with codecs.open('/Users/wangxingfan/Desktop/1.html','w','utf-8') as html_file: html_file.write(df.to_html(header = True,index = False))
以上這篇python pandas實現excel轉為html格式的方法就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持武林站長站。
新聞熱點
疑難解答