Skip to content

Commit

Permalink
Add GT.cols_label()
Browse files Browse the repository at this point in the history
  • Loading branch information
jrycw committed Sep 17, 2024
1 parent 3a891dc commit 2f19948
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions great_tables/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1085,9 +1085,9 @@ def define_units(units_notation: str) -> UnitDefinitionList:
```{python}
(
GT(df).tab_header(
title="Linear Algebra", subtitle="y={{a_2}}{{x^2}}+{{a_1}}x+{{a_0}}"
)
GT(df)
.cols_label(a2="{{a_2}}", a1="{{a_1}}", a0="{{a_0}}")
.tab_header(title="Linear Algebra", subtitle="y={{a_2}}{{x^2}}+{{a_1}}x+{{a_0}}")
)
```
Expand All @@ -1113,7 +1113,11 @@ def u2html(x: str) -> str:
+ u2html("{{a_0}}")
)
(GT(df).tab_header(title="Linear Algebra", subtitle=html(subtitle)))
(
GT(df)
.cols_label(a2="{{a_2}}", a1="{{a_1}}", a0="{{a_0}}")
.tab_header(title="Linear Algebra", subtitle=html(subtitle))
)
```
"""
Expand Down

0 comments on commit 2f19948

Please sign in to comment.