title: Email DF as attachment
body: <p>I want to email a Pandas Dataframe as an excel .xlsx attachment. If I save the df as an excel doc via <code>df.to_excel()</code>, I'm able to create the attachment with <code>attachment  = "C:\\Users\\ME\\Documents\\df.xlsx"</code>. However, I'd like to be able to send the df as a .xlsx without first saving it. Thanks!</p>
  
  <pre><code>import win32com.client as win32
  df = pd.DataFrame([1,2])
  
  mail = outlook.CreateItem(0)
  mail.To = 'recipient@gmail.com'
  mail.Subject = 'See Attachment'
  mail.HTMLBody = 'See Attachment'
  attachment  = df.to_excel()
  mail.Attachments.Add(attachment)
  mail.Send()
  </code></pre>