pandas - Show DataFrame as table in iPython Notebook -
i using ipython notebook. when this:
df i beautiful table cells. however, if this:
df1 df2 it doesn't print first beautiful table. if try this:
print df1 print df2 it prints out table in different format spills columns on , makes output tall.
is there way force print out beautiful tables both datasets?
you'll need use html() or display() functions ipython's display module:
from ipython.display import display, html # assuming dataframes df1 , df2 defined: print "dataframe 1:" display(df1) print "dataframe 2:" html(df2.to_html()) note if print df1.to_html() you'll raw, unrendered html.
you can import ipython.core.display same effect
Comments
Post a Comment