1

I am creating a conditional formatting table in Python using pandas and seaborn which gives me a pandas.io.formats.style.Styler object. I need to export this as an image file .

I cannot use imgkit, unable to install wkhtmltopdf.


    import pandas as pd
    import seaborn as sns

    iris = pd.read_excel('iris.xlsx')
    iris.head()

    cm = sns.diverging_palette(240, 10, sep=20, as_cmap=True)
    sample = iris.style.background_gradient(cmap=cm)
    sample

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
Pawan_Malviya
  • 53
  • 1
  • 4

0 Answers0