相关疑难解决方法(0)

如何将Pandas数据帧/系列数据保存为数字?

这听起来有点奇怪,但我需要将Pandas控制台输出字符串保存到png图片.例如:

>>> df
                   sales  net_pft     ROE    ROIC
STK_ID RPT_Date                                  
600809 20120331  22.1401   4.9253  0.1651  0.6656
       20120630  38.1565   7.8684  0.2567  1.0385
       20120930  52.5098  12.4338  0.3587  1.2867
       20121231  64.7876  13.2731  0.3736  1.2205
       20130331  27.9517   7.5182  0.1745  0.3723
       20130630  40.6460   9.8572  0.2560  0.4290
       20130930  53.0501  11.8605  0.2927  0.4369 
Run Code Online (Sandbox Code Playgroud)

有没有什么方法df.output_as_png(filename='df_data.png')可以生成一个只显示上面内容的图片文件?

python matplotlib pandas

37
推荐指数
4
解决办法
4万
查看次数

标签 统计

matplotlib ×1

pandas ×1

python ×1