欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python pandas實現(xiàn)excel轉(zhuǎn)為html格式的方法

 更新時間:2018年10月23日 11:10:05   作者:諾坎普奇跡  
今天小編就為大家分享一篇python pandas實現(xiàn)excel轉(zhuǎn)為html格式的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

如下所示:

#!/usr/bin/env Python
# coding=utf-8
import pandas as pd
import codecs
xd = 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實現(xiàn)excel轉(zhuǎn)為html格式的方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論