Skip to content

phil-nox/df2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 df2html

Save your pandas.DataFrame to an .html file with Jupyter Notebook styles.

Code sample

General

import pandas as pd
import df2html

df: pd.DataFrame = pd.DataFrame({
    'planet': ['Earth', 'Mars'],
    'link': ['https://en.wikipedia.org/wiki/Earth', 'https://en.wikipedia.org/wiki/Mars'],
    'radius_km': [6371, 3390],
})

print(df2html.save(df))

Using a different font size

path2file, ref2code = df2html.save(df, styles_extended=[{'selector': '', 'props': [('font-size', '10px')]}])
print(path2file)  # 'file://<path_2_file>/df.html'
print(ref2code)   # 'File "<path_2_source_code>", line NN'

Dependencies

About

Save your pandas.DataFrame to an .html file with Jupyter Notebook styles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages