1doc.packages.append(Package('adjustbox')) # Include the package
2
3doc.append(NoEscape(r'\begin{adjustbox}{width=1\textwidth}'))
4table.append(NoEscape(df.to_latex(escape=False))) # Your df.to_latex() code here
5doc.append(NoEscape(r'\end{adjustbox}'))