I have created a pdf that saves several plots created using Matplotlib.
I did the following to create the pdf
from matplotlib.backends.backend_pdf import PdfPages
report = PdfPages('report.pdf')
After creating a plot, I would do this report.savefig()
each time. However, I also want to output dataframes I generated into the Pdf. Essentially I want a report contain plots and queried dataframes all in one place. Is it possible to add a dataframe to the Pdf using the one created with PdfPages and if so, how would I do so? If not, is there another approach that would allow the plots and dataframe to be in once place (without having to save individual components and piecing them together)? Would love any suggestions and examples. Thanks!