Пример:
Код: Выделить всё
import pandas as pd
import numpy as np
table=np.asarray([['$x^2$',3]])
df=pd.DataFrame(table[:,1], columns=['value'], index=table[:,0])
print(df.to_latex(encoding='utf-8'))
Код: Выделить всё
\begin{tabular}{ll}
\toprule
{} & value \\
\midrule
\$x\textasciicircum2\$ & 3 \\
\bottomrule
\end{tabular}
Подробнее здесь: https://stackoverflow.com/questions/442 ... s-mathmode