博客
关于我
将DataFrame作为邮件正文HTML发送 in Python
阅读量:336 次
发布时间:2019-03-04

本文共 509 字,大约阅读时间需要 1 分钟。

  • Overview

    To convert this question into english, maybe:

    How to convert a DataFrame into a petty HTML table and send it over Email, like this one .

    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.

  • 其他方案

    通过df.to_html(), 参见R3

  • 延展问题:同时发送HTML和Plain格式的Email

    R2提到,可以同时发送HTML和Plain,通过msg=MIMEMultipart('alternative')实现。

    使用此模块添加html table之后,会覆盖plain文本,导致上述方案无效。

    可以将plain文本格式也改成html

  • References

转载地址:http://stge.baihongyu.com/

你可能感兴趣的文章
Python中Class类与def函数的区别
查看>>
OpenAI Gym简介及初级实例
查看>>
用Matplotlib和Gym优雅地呈现股票交易智体
查看>>
Github上量化交易相关项目汇总
查看>>
JS取出两个数组中的不同或相同元素
查看>>
Ubuntu 18.04 zip压缩文件及其文件 夹中的所以 内容
查看>>
MFC:pic控件的矩形的left、right、top、bottom 坐标位置
查看>>
mfc 中在对Gdi+ 进行配置之后,编译产生很多error错误
查看>>
int 转 CString
查看>>
Edit编辑框自动换行与长度
查看>>
STMF4 : error: #928: incorrect use of va_start
查看>>
如何在Windows上搭建NFS服务器实现开发板与Windows之间的文件共享
查看>>
英语02_单词词性
查看>>
C语言08_数组[ Array ]
查看>>
C语言12_预处理 #
查看>>
低通滤波器的设计
查看>>
窄带随机过程的产生
查看>>
随机四则运算
查看>>
Maven
查看>>
zookeeper使用
查看>>