python pandas实现excel转为html格式的方法
如下所示:
#!/usr/bin/envPython #coding=utf-8 importpandasaspd importcodecs xd=pd.ExcelFile('/Users/wangxingfan/Desktop/1.xlsx') df=xd.parse() withcodecs.open('/Users/wangxingfan/Desktop/1.html','w','utf-8')ashtml_file: html_file.write(df.to_html(header=True,index=False))
以上这篇pythonpandas实现excel转为html格式的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持毛票票。