def update_html(df, metadb_timestamp):
pd.set_option('display.max_colwidth', -1)
table_html = df.to_html(formatters={
"doi": format_doi, "gse": format_gse}, escape=False, index=False, justify="left", classes="table table-striped table-bordered")
html_template_str = unicode(open("output_template.html").read())
n_overdue = df.shape[0]
final_html = html_template_str.format(date_updated=datetime.date.today(), metageo_timestamp=metadb_timestamp,
n_overdue=n_overdue, table_html=table_html, tracking_script=tracking_script)
with open("docs/index.html", "w") as f:
f.write(final_html.encode("utf-8"))
评论列表
文章目录