stargazer icon indicating copy to clipboard operation
stargazer copied to clipboard

Add optional parameters to render_html and render_latex to export to files

Open MaxGhenis opened this issue 5 years ago • 4 comments

Fixes #29. Also adds function documentation for render_html and render_latex.

MaxGhenis avatar Jun 03 '20 03:06 MaxGhenis

Just one thought: pandas.DataFrame.to_latex() has a similar argument, but when passed, the method it will not return the representation as string. To be honest I don't see any downside with your approach, not even of consistency (worst case scenario, users accustomed to pandas might not notice that something is being returned), but I was just wondering if there is any.

toobaz avatar Jun 04 '20 10:06 toobaz

Good point, I think it makes more sense to follow pandas's lead and suppress printing if out is provided. For example, my workflow has been to first print the table in HTML in my Jupyter notebook, then export to tex if it looks good; neither the raw html nor tex outputs are very useful just as printed results.

If you agree I'll go ahead and make the change to this PR.

MaxGhenis avatar Jun 04 '20 17:06 MaxGhenis

@toobaz please let me know if you'd prefer output suppressed when providing out.

MaxGhenis avatar Jun 12 '20 00:06 MaxGhenis

@toobaz please let me know if you'd prefer output suppressed when providing out.

Yes, please!

toobaz avatar Jun 27 '20 15:06 toobaz