博客
关于我
将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/

你可能感兴趣的文章
YbtOJ hash和hash表课堂过关 例1 字符串哈希【hash】
查看>>
YbtOJ hash和hash表课堂过关 例4 单词背诵【hash】【二分】
查看>>
CSUST 2021 周赛 2 题解
查看>>
【人脸识别】基于matlab GUI灰度化教室人数统计【含Matlab源码 602期】
查看>>
前后端数据交互之表单
查看>>
剑指offer JZ15 反转链表
查看>>
剑指offer JZ21 栈的压入弹出序列
查看>>
剑指offer JZ31 整数中1出现的次数
查看>>
实现基于scrapy框架的天气预报爬虫hengYangSpaider @572311文
查看>>
Windows 10 安装 MySQL 8
查看>>
maven打包指定名称并去除jar-with-dependencies后缀
查看>>
Netty4服务端入门代码示例
查看>>
Netty4客户端入门代码示例
查看>>
java连接mysql,jdbc驱动
查看>>
python 垃圾回收机制 以及 内存管理
查看>>
C++中的static成员函数以及static成员变量详解
查看>>
操作系统前传第六课--开发中的辅助工具
查看>>
Linux系统编程44 信号 - 信号的响应过程分析!!!
查看>>
QT17 - 对话框及其类型 QDialog
查看>>
Linux系统编程67 网络编程1 - 报式套接字传输
查看>>