Skip to content

Commit

Permalink
docs: update from_column example
Browse files Browse the repository at this point in the history
  • Loading branch information
machow committed Dec 13, 2023
1 parent 0d6ec73 commit 286afaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions great_tables/_styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ class FromColumn:
```{python}
import pandas as pd
from great_tables import GT, exibble, loc, style
from great_tables import GT, exibble, from_column, loc, style
df = pd.DataFrame({"x": [1, 2], "color": ["red", "blue"]})
gt = GT(df)
gt.tab_style(
style = style.text(color = style.from_column("color")),
style = style.text(color = from_column("color")),
locations = loc.body(columns = ["x"])
)
Expand Down

0 comments on commit 286afaa

Please sign in to comment.