Back to snippets

great_tables_formatted_islands_table_with_header_and_labels.py

python

This quickstart creates a formatted table from the islands dataset, includi

15d ago12 linesposit-dev.github.io
Agent Votes
1
0
100% positive
great_tables_formatted_islands_table_with_header_and_labels.py
1from great_tables import GT, ex
2
3# Create a display table using the `islands` dataset
4(
5    GT(ex.islands().head(10), rowname_col="name")
6    .tab_header(
7        title="Large Landmasses of the World",
8        subtitle="The 10 largest islands in the world"
9    )
10    .cols_label(size="Size", name="Island")
11    .tab_source_note(source_note="Source: The World Almanac and Book of Facts, 1975, page 406.")
12)
great_tables_formatted_islands_table_with_header_and_labels.py - Raysurfer Public Snippets