Skip To Article

Github Flavoured

Tables can be written using the standard Github Flavoured Markdown syntax:

Cells in a column can be aligned using the : character:

Table directive

To add more features to your table, you can use the {table} directive. Here you can add a caption and label. Adding a label enables cross-referencing .

List Tables

The {list-table} directive is used to create a table from data in a uniform two-level bullet list. “Uniform” means that each sublist (second-level list) must contain the same number of list items.

CSV Tables

The {csv-table} directive is used to create a table from comma-separated values (CSV) data. Block markup and inline markup within cells is supported. Line ends are recognized within quoted cells.

Complex Tables with Style

It is also possible to write tables in raw HTML with rowspan and colspan, as well as for example:

Include tables from file

If you have tables in a file (e.g. output from your data analysis elsewhere), you can use the {include} directive. This works both for HTML and LaTeX tables (table-from-file.html).

::::{table} Area Comparisons (imported HTML file)
:label: tbl:areas-html-file

:::{include} table-from-file.html
:::

::::

Table 1:Area Comparisons (imported HTML file)

ProjectionArea in square miles
Large Horizontal AreaLarge Vertical AreaSmaller Square Area
Albers Equal Area7,498.710,847.335.8
Web Mercator13,410.018,271.463.0
Difference5,911.37,424.127.2
Percent Difference44%41%43%

Notebook outputs as tables

You can embed Jupyter Notebook outputs as tables. See Embed and Reuse Jupyter Outputs for more information.

MyST MarkdownMyST Markdown
Community-driven tools for the future of technical communication and publication, part of Jupyter.