1pip install dataframe_image
2import dataframe_image as dfi
3df = pd.DataFrame(np.random.randn(6, 6), columns=list('ABCDEF'))
4# style your table if you want by:
5df_styled = df.style.background_gradient() #adding a gradient based on values in cell
6
7dfi.export(df_styled,"mytable.png")