I wrote a code that converts a dataframe to html and emails it. I need to union/append this table with another table(one on top of another). Can someone please help me figure out how I would do that?
Here is my code:
# 'dataset' holds the input data for this script import pandas
from email.mime.text import MIMEText from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from smtplib import SMTP import smtplib import sys
msg = MIMEMultipart() msg['Subject'] = "Daily Report" msg['From'] = 'MM@gmail.com'
html = """\ <html> <head></head> <body>
{0} </body> </html> "Name" """.format(pandas.DataFrame(dataset).to_html())
part1 = MIMEText(html, 'html') msg.attach(part1)
server = smtplib.SMTP_SSL("smtp.gmail.com",465) server.login('MM@gmail.com', 'pythontest') server.sendmail("Sender@gmail.com","Receiver@python.com",msg.as_string()) server.quit()*