def make_state_page(df, conn, keyname='CA', bucketname='www.jobs.com'):
'''ingests a table to print do s3 website bucket'''
# fix issue with printing the entire dataframe
pd.set_option('display.max_colwidth', -1)
website_bucket = conn.get_bucket(bucketname)
html = df.to_html(
formatters=dict(
title=markdown
),
escape=False,
index=True
) +" postings last updated "+str(datetime.now().strftime("%Y-%m-%d %H:%M"))
html = '<!DOCTYPE html><HTML><head><link rel="stylesheet" href="http://s3.amazonaws.com/www.jobs.com/style.css"></head><body>{}</body></HTML>'.format(html.encode('utf8'))
send_to_s3(keyname=keyname, bucket=website_bucket, html=html)
return None
评论列表
文章目录