3 ms·
I hear a lot of talk about using python for data analysis. I gave up after trying to find a library to do cross tabs. Is there something to make custom tables i
by TheLogothete 10y ago
I hear a lot of talk about using python for data analysis. I gave up after trying to find a library to do cross tabs. Is there something to make custom tables in python other than prettytables?
- jboynyc 10y agoWhat's wrong with using Pandas? http://pandas.pydata.org/pandas-docs/version/0.17.0/generated/pandas.crosstab.html http://pandas.pydata.org/pandas-docs/version/0.17.0/generate...
- TheLogothete 10y agoPerhaps I should have been more clear. I want to present the results in pdf or html. Like xtables, tables and stargazer packages in R.
- closed 10y agoI 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/f2f4a2e9181f6ec22e88 http://nbviewer.jupyter.org/gist/chris1610/f2f4a2e9181f6ec22...
- Notre1 10y agoOooo, 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.
- Notre1 10y agoYou 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 http://pbpython.com/pdf-reports.html [2] http://pandas.pydata.org/pandas-docs/stable/style.html http://pandas.pydata.org/pandas-docs/stable/style.html