bashtage/linearmodels

Sanitize extra text from summary

gmoore016 opened this issue · 0 comments

The extra text at the end of tables is seemingly not editable after it is introduced.

Consider the example below:

image

In this example, I produce a regression table summary. However, at the bottom of the table there is text (starting with "Endogeneous: q"). While I think this means well, it makes the package incompatible with automatic LaTeX export; when using NBConvert to change a Jupyter Notebook into a PDF, LaTeX returns an error and fails. When exporting to LaTeX directly and forcing compilation, the problem becomes clear:

image

The underscores in the variable names produced in the text are not handled cleanly, such that they are interpreted as LaTeX subscripts rather than text. While of course the ideal would be to export these cleanly, a close substitute would be to allow us to remove the text from the bottom of this table. However, as far as I can tell from the documentation, once text is added there's no way to empty the summary's text field; let me know if I am mistaken. A simple fix here would be something like a .clear_notes() method which empties all notes attached to the summary table.