2

I found several ways to PRINT tables in nicer formatting but can I also SAVE those outputs to a file (not csv, excel etc.)? They don't even need to be changeable, an image-like representation would be great. I get presentation-ready dataframes that I have to reformat since I'm saving them in excel files at the moment.

tdawg
  • 89
  • 5

1 Answers1

2

Assuming this table is a pandas DataFrame, this library might help:

www.dexplo.org/dataframe_image/

This library would export pandas DataFrames in a jupyter notebook fashioned way.

Example usage:

import pandas as pd
import dataframe_image as dfi
df = pd.DataFrame({'key':[1,2,3],'val':['a','b','c']})
dfi.export(df, 'dataframe.png')

enter image description here

Jett Chen
  • 382
  • 2
  • 8