Skip to content

How to format the row with the fields names #116

Closed Answered by jrschueller
aborruso asked this question in Q&A
Discussion options

You must be logged in to vote

I am experimenting with the html() helper function, and it looks like you can pass in whatever you wish. To drive the point home, here's one of the examples with the header swapped out with Comic Sans:

from great_tables.data import islands

islands_mini = islands.head(10)

(
    GT(islands_mini, rowname_col = "name")
    .tab_header(
        title = gt.html("<p style=\"font-family: Comic Sans MS; text-align: center\"><b>Large</b> landmasses of the world</p>"),
        subtitle = "The top ten largest are presented"
    )
    .tab_source_note(
        source_note = "Source: The World Almanac and Book of Facts, 1975, page 406."
    )
    .tab_source_note(
        source_note = md("Reference:…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rich-iannone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants