great_tables
  • Get Started
  • Examples
  • Reference
  • Blog

On this page

  • Parameters
  • Examples

GT.show

GT.show(self, target='auto')

Display the table in a notebook or a web browser.

Note that this function is often unecessary in a notebook. However, it’s sometimes useful for manually triggering display within a code cell.

Parameters

target : Literal['auto', 'notebook', 'browser'] = 'auto'

Where to show the table. If “auto”, infer whether the table can be displayed inline (e.g. in a notebook), or whether a browser is needed (e.g. in a console).

Examples

The example below when in the Great Tables documentation, should appear on the page.

from great_tables import GT, exibble

GT(exibble.head(2)).show()
GT(exibble.tail(2)).show()
num char fctr date time datetime currency row group
0.1111 apricot one 2015-01-15 13:35 2018-01-01 02:22 49.95 row_1 grp_a
2.222 banana two 2015-02-15 14:40 2018-02-02 14:33 17.95 row_2 grp_a
num char fctr date time datetime currency row group
777000.0 grapefruit seven 19:10 2018-07-07 05:22 row_7 grp_b
8880000.0 honeydew eight 2015-08-15 20:20 0.44 row_8 grp_b