title: Pandas send email containing dataframe as a visual table
body: <p>Take this example:</p>
  
  <pre><code>df_1 = ([1,2,3,5])
  df_2 = ([10,20,30,50])
  df_test =pd.concat([pd.DataFrame(df_1),pd.DataFrame(df_2)],axis=1)
  </code></pre>
  
  <p>How can I send an email, via gmail, with this dataframe to look like a table?</p>
  
  <p><a href="https://i.stack.imgur.com/JCuh7.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/JCuh7.jpg" alt="enter image description here"></a></p>
  
  <p>This is what I tried:</p>
  
  <pre><code>import smtplib
  
  server = smtplib.SMTP('smtp.gmail.com', 587)
  server.starttls()
  server.login(fromaddr , ".......")
  
  msg = df_test.to_html()
  server.sendmail(fromaddr, toaddr, msg)
  server.quit()
  </code></pre>