是否可以将Pandas数据框导出为图像文件?像df.to_png()或的东西df.to_table().savefig('table.png').
df.to_png()
df.to_table().savefig('table.png')
目前我使用导出数据帧df.to_csv().然后,我在Excel中打开此csv文件以使数据看起来漂亮,然后将Excel表格复制/粘贴到Powerpoint中作为图像.我看到matplotlib有一个.table()方法,但我无法让它与我的df一起工作.
df.to_csv()
.table()
我正在使用的数据框有5列5行,每个'单元'是一个数字.
python pandas
pandas ×1
python ×1