How to save the output of a jupyter notebook cell (a pandas dataframe) as a high resolution picture?

Question:

For normal plots I can set the dpi argument to generate a high resolution picture.

But for outputs of a cell such as in this picture, which is a output by displaying a pandas dataframe, how can I save it as a high resolution picture?

enter image description here

The above picture is from a screen capture but I dont really like it.

Asked By: user900476

||

Answers:

See my comment here about dataframe_image. As I now detail at my site about dataframe2img, dataframe_image is a more mature solution.

dataframe_image:

"A python package for embedding pandas DataFrames as images into pdf and markdown documents."

Note specifically in the dataframe_image README under ‘Exporting individual DataFrames’:

"You may also export directly from the DataFrame or styled DataFrame using the dfi.export and export_png methods, respectively."

Answered By: Wayne
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.