statsmodels/statsmodels — pull request #636 by vincentarelbundock (2013-01-30 14:53:39+00:00)
Title: Summary re-write

This PR consolidates work conducted in https://github.com/statsmodels/statsmodels/pull/582. I doubt this is perfect, but I'm removing the WIP label because this work can no longer move forward without "official" review.

This notebook is not quite up-to-date, but it gives a very good sense of what's possible: http://nbviewer.ipython.org/4124662/

What's in here:

* Summary class: smry = Summary()
* Convert user input to DataFrames: smry.add_dict(), smry.add_df(), smry.add_array()
* DataFrame -> SimpleTables -> Output: smry.as_text(), smry.as_html(), smry.as_latex()
* Helper functions for convenient generation of summary objects: summary_params, summary_model
* Side-by-side summaries for multiple models: summary_cols
* 14 tests
* The main model summaries have all been converted to the new format. I've kept the old summary functions as "summary_old.py" so that sandbox examples can still use it in the interim until everything is converted over.

On ASCII tables implementation: _measure_tables takes a list of DFs, converts them to ascii tables, measures their widths, and calculates how much white space to add to each of them so they all have same width. Then, smry.as_text() produces a new set of ascii tables via SimpleTable by specifying the white space in the colsep output option. In theory, this means we shouldn't ever have to fiddle with make tables fit by hand, and larger column titles/entries should be accommodated (within reason).