How to generate pdf report from python code plot and result dataframe

Viewed 335

Given a Pandas.DataFrame with numeric data, I'm looking for way to output the following directly into a pdf file:

  • The Pandas.DataFrame itself as a table
  • The plot of the Pandas.DataFrame
  • A few lines of text
  • A title
  • Add a logo on left top side of a page

All these should happen automatically at the end of the sctipt execution.

The Pandas.DataFrame is the following:

df_out = pd.DataFrame({'A':[1,3,4,7,8,11,1,15,20,15,16,87],
                 'B':[1,3,4,6,8,11,1,19,20,15,16,87],
                 'flag':[0,0,0,0,1,1,1,0,0,1,0,0]})

plt.plot(df_out['B'].values)


write text1:
this plot is good 

write text 2:  This table is write 

Thanks in advance for any sugestions.

0 Answers
Related