6

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.

Can I do something similar with Pandas HTML Tables?

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?

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

2
  • 6
    Is IPython.display.display(table) what you're after? i.e. call it once per table, it should show them all in the output. Commented Jan 18, 2014 at 19:06
  • That did it.. I'll post a snippet... Commented Jan 19, 2014 at 21:54

1 Answer 1

3

This does it:

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)

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

Sign up to request clarification or add additional context in comments.

1 Comment

FYI You can create those tab numbers like this: list(map(str, range(1, 28))).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.