pandas pd.to_markdown() 转换为 Markdown pd.to_latex() 转换为 latex

前提
安装 tabulate 库
pip install tabulate


不然会在调用 df.to_markdown() 时报错
Missing optional dependency 'tabulate'.  Use pip or conda to install tabulate.

df.to_markdown()

 

 


df.to_latex()

 

posted @ 2021-10-06 14:33  CodeYaSuo  阅读(347)  评论(0编辑  收藏  举报