1

I am trying to write a report for my project in LaTex. I am able to put code onto my LaTex Document, but I wanted to know if it is possible to import my output cell which is a table onto my LaTex document? If not, any other suggestions where I should not create my own table for every output.

Image

  • Welcome to TeX.SX! You seem to just read a CSV file. Why don't you include that into LaTeX? We have questions concerning CSV files on this site. – TeXnician Sep 30 '18 at 16:06
  • @TeXnician Providing a link would be highly appreciated – Ayman Arif Sep 30 '18 at 16:40
  • Something like https://tex.stackexchange.com/questions/146716/importing-csv-file-into-latex-as-a-table – TeXnician Sep 30 '18 at 16:42
  • Note also http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_latex.html?highlight=to_latex#pandas.DataFrame.to_latex – Torbjørn T. Sep 30 '18 at 19:33

1 Answers1

4

Since you are using pandas you can use dataset.to_latex(dataset.tex) This would give you a latex table. Also you can just get the whole jupyter notebook as LaTeX code and than take what ever you want from it. For this you could use jupyter nbconvert /path/jupyterscript.ipynb --to latex This would give you your table and the code you needed to generate the table.

Mibi
  • 486