将DataFrame作为邮件正文HTML发送 in Python

  • OverviewTo convert this question into english, maybe: How to convert a DataFrame into a petty HTML table and send it over Email, like this one here. From R1,there is a module named pretty_html_table .
  • The objective of this package is to convert a pandas dataframe into a pretty html table. As of now, 10 colors are available.

  • 延展问题:同时发送HTML和Plain格式的EmailR2提到,可以同时发送HTML和Plain,通过 msg=MIMEMultipart('alternative')实现。 使用此模块添加 html table之后,会覆盖 plain文本,导致上述方案无效。 可以将 plain文本格式也改成 html

Original: https://blog.csdn.net/The_Time_Runner/article/details/113405907
Author: quantLearner
Title: 将DataFrame作为邮件正文HTML发送 in Python

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/742815/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球