0

I have a number of styled dataframes (using df.style), how would I go about converting this to an image.

If I try and save these down using:

df_styled.savefig('/u1/username/df_styled.png')

I get the following error:

AttributeError: 'Styler' object has no attribute 'savefig'
flaws49
  • 29
  • 6
  • Does this answer your question? [Export pandas Styled table to image file](https://stackoverflow.com/questions/45664519/export-pandas-styled-table-to-image-file) – Wouter Nov 24 '21 at 14:08
  • I've tried this but get the following error: OSError: No wkhtmltoimage executable found: "command not found" If this file exists please check that this process can read it. Otherwise please install wkhtmltopdf - http://wkhtmltopdf.org – flaws49 Nov 24 '21 at 14:16
  • Then install wkhtmltopdf – Wouter Nov 24 '21 at 14:20
  • I have it installed already which is why its strange. Do you know what it means by "No wkhtmltoimage executable found: "command not found" If this file exists please check that this process can read it."? – flaws49 Nov 24 '21 at 14:23
  • It means that is not installed, or cannot be found. Check if you can use wkhtmltoimage commands from the command line, verify if all paths are set correctly, or ask a new question. – Wouter Nov 24 '21 at 14:26

0 Answers0