Problem: I tried to export a pandas.DataFrame to LaTex using .to_latex().
However, the output for long values (in my case long strings) gets truncated.
Step to reproduce:
import pandas as pd df = pd.DataFrame(['veryLongString' * i for i in range(1, 5)], dtype='string') print(df.to_latex()) Output:
\begin{tabular}{ll} \toprule {} & 0 \\ \midrule 0 & veryLongString \\ 1 & veryLongStringveryLongString \\ 2 & veryLongStringveryLongStringveryLongString \\ 3 & veryLongStringveryLongStringveryLongStringvery... \\ \bottomrule \end{tabular} As you can see, the last row gets truncated (with ...). I already tried to use the col_space parameter but this does not change the behavior as expected. It simply shifts the table cells as following:
\begin{tabular}{ll} \toprule {} & 0 \\ \midrule 0 & veryLongString \\ 1 & veryLongStringveryLongString \\ 2 & veryLongStringveryLongStringveryLongString \\ 3 & veryLongStringveryLongStringveryLongStringvery... \\ \bottomrule \end{tabular} How do I get the full content of the DataFrame exported to Latex?
