Hacker News new | ask | show | jobs
by jboynyc 3707 days ago
What's wrong with using Pandas? http://pandas.pydata.org/pandas-docs/version/0.17.0/generate...
1 comments

Perhaps I should have been more clear. I want to present the results in pdf or html. Like xtables, tables and stargazer packages in R.
I haven't used xtables or stargazer in a while, but ipython + pandas can display tables as html.

Here is an interesting ipython notebook with some examples:

http://nbviewer.jupyter.org/gist/chris1610/f2f4a2e9181f6ec22...

Oooo, I'm going to have to look at that qgrid widget. I've been frustrated when I had to dump a df (DataFrame) to Excel to browse a large df.
You can easily export any pandas DataFrame to html using the to_html() method. To generate full webpage, you'll probably want a templating engine like Jinja2.

The best demo I've seen for generating a PDF report is on Practical Business Python[1]

Edit: I forgot to mention the new pandas Style[1] feature for generating some impressive looking html tables.

[1] http://pbpython.com/pdf-reports.html

[2] http://pandas.pydata.org/pandas-docs/stable/style.html