Missing repr_latex method for latex/pdf conversion in jupyter notebooks by bkasel · Pull Request #11778 · pandas-dev/pandas (original) (raw)

Hello, this is my very first pull request on github. I added latex/pdf conversion capabilities to the dataframe when used in a Jupyter/Ipython notebook. The method simply uses the existing to_latex method of the Dataframe class. I believe teh following Issues or PR have already attempted this, but they seem closed: #11399 and #9821

The repr_latex method looks for newly created options:
- display.latex_escape
- display.latex_longtable
which are passed as arguments to the to_latex method.

a simple test has been added to check if the conversion works. However, if the
implementation of the to_latex method changes, the test function would also have to be updated.