Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas dataframe caption

styles = [dict(selector="caption", 
    props=[("text-align", "center"),
    ("font-size", "120%"),
    ("color", 'black')])]    # the color value can not be None
# ...

    output += df.style.set_table_attributes("style='display:inline; font-size:110%' ")
        .set_caption(caption)
        .set_table_styles(styles)    # include styles
        ._repr_html_()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #dataframe
ADD COMMENT
Topic
Name
1+6 =