使用Pandas在IPython笔记本中显示多个输出表 [英] Display multiple output tables in IPython notebook using Pandas

查看:129
本文介绍了使用Pandas在IPython笔记本中显示多个输出表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在知道我可以从IPython pandas输出多个图表,方法是将它们嵌入到一个绘图空间中,该空间将出现在笔记本中的单个输出单元格中。

I now know that I can output multiple charts from IPython pandas by embedding them in one plot space which will appear in a single output cell in the notebook.

可以我做了类似于Pandas HTML Tables的事情吗?

Can I do something similar with Pandas HTML Tables?

我从电子表格的多个标签(大约15-20)获取数据并通过一组回归运行它们'喜欢把结果显示在一起,也许是2起..但是由于显示表的功能只显示一个,最后一个,不知道如何接近。想法?

I am getting data from multiple tabs (about 15-20) on a spreadsheet and running them though a set of regressions and I'd like to display the results together, perhaps 2 up.. But since the function to display the table only displays one, the last one, not sure how to approach. Ideas?

我甚至乐意在连续的输出单元格中显示..不确定如何做到这一点但我想我可以做一些非常脏的调用每个(电子表格) )选项卡在一个单独的单元格中..呃... FWIW我在IPython 2.0 dev和Pandas 13

I'd even be happy to display in successive output cells.. not real sure how to do that either But I guess I could do something really dirty calling each (spreadsheet) tab in a separate cell.. Ughh... FWIW I'm on IPython 2.0 dev and Pandas 13

推荐答案

这样做它:

area-tabs=list(map(str, range(1, 28))) # for all 27 tabs
#area_tabs=['1','2'] # for specific tabs
for area_tabs in area_tabs:
    actdf,aname = get_data(area_tabs) #get_data gets the data and does a bunch or regression and table building
    aname,actdf,merged2,mergederrs,montdist,ols_test,mergedfcst=projections(actdf)
    IPython.display.display('Area: %s' % aname, mergederrs.tail(12))
    IPython.display.display('Area: %s' % aname, ols_test)
    IPython.display.display('Area: %s' % aname, merged2)

我可以打印t上每个标签的所有结果他的电子表格

SO I can print all the results for each tab on the spreadsheet

这篇关于使用Pandas在IPython笔记本中显示多个输出表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆