From 0d0a4aa1cd0ab2cb1cc0987c9010c4e6903a4d15 Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Fri, 30 Aug 2024 11:00:11 -0400 Subject: [PATCH 1/3] Update documentation for `tab_spanner()` --- great_tables/_spanners.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/great_tables/_spanners.py b/great_tables/_spanners.py index 51f804d3c..3a0360f70 100644 --- a/great_tables/_spanners.py +++ b/great_tables/_spanners.py @@ -40,6 +40,16 @@ def tab_spanner( `level` as space permits) and with `replace`, which allows for full or partial spanner replacement. + Labels may use either of three types of input: + + 1. plain text + 2. Markdown or HTML text through use of the [`md()`](`great_tables.md`) or + [`html()`](`great_tables.html`) helpers, respectively. + 3. Text set in curly braces for applying special formatting, called unit notation. For example, + "area ({{ft^2}})" would appear as "area (ft²)". + + See [`define_units()`](`great_tables.define_units`) for details on unit notation. + Parameters ---------- label From 73f6e8c97881cf54a03e7579f7cc5d78fb7f768b Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Thu, 12 Sep 2024 12:35:22 -0400 Subject: [PATCH 2/3] Simplify docs in .tab_spanner() --- great_tables/_spanners.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/great_tables/_spanners.py b/great_tables/_spanners.py index 3a0360f70..3e13b83ff 100644 --- a/great_tables/_spanners.py +++ b/great_tables/_spanners.py @@ -40,22 +40,13 @@ def tab_spanner( `level` as space permits) and with `replace`, which allows for full or partial spanner replacement. - Labels may use either of three types of input: - - 1. plain text - 2. Markdown or HTML text through use of the [`md()`](`great_tables.md`) or - [`html()`](`great_tables.html`) helpers, respectively. - 3. Text set in curly braces for applying special formatting, called unit notation. For example, - "area ({{ft^2}})" would appear as "area (ft²)". - - See [`define_units()`](`great_tables.define_units`) for details on unit notation. - Parameters ---------- label The text to use for the spanner label. We can optionally use the [`md()`](`great_tables.md`) and [`html()`](`great_tables.html`) helper functions to style the text as Markdown or to - retain HTML elements in the text. + retain HTML elements in the text. Alternatively, units notation can be used (see + [`define_units()`](`great_tables.define_units`) for details.) columns The columns to target. Can either be a single column name or a series of column names provided in a list. From 37772beeb6d49b1b5a7627ebf79090d4ff2e3536 Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Thu, 12 Sep 2024 12:36:36 -0400 Subject: [PATCH 3/3] Update _spanners.py --- great_tables/_spanners.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/great_tables/_spanners.py b/great_tables/_spanners.py index 3e13b83ff..5ae726575 100644 --- a/great_tables/_spanners.py +++ b/great_tables/_spanners.py @@ -46,7 +46,7 @@ def tab_spanner( The text to use for the spanner label. We can optionally use the [`md()`](`great_tables.md`) and [`html()`](`great_tables.html`) helper functions to style the text as Markdown or to retain HTML elements in the text. Alternatively, units notation can be used (see - [`define_units()`](`great_tables.define_units`) for details.) + [`define_units()`](`great_tables.define_units`) for details). columns The columns to target. Can either be a single column name or a series of column names provided in a list.