Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update import statement in the GT.data_color() example #432

Merged
merged 1 commit into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions great_tables/_data_color/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ def data_color(
do this with the `exibble` dataset:

```{python}
import great_tables as gt
from great_tables import GT
from great_tables.data import exibble

gt.GT(gt.data.exibble).data_color()
GT(exibble).data_color()
```

What's happened is that `data_color()` applies background colors to all cells of every column
Expand All @@ -146,8 +147,7 @@ def data_color(
supply `palette=` values of `"red"` and `"green"`.

```{python}

gt.GT(gt.data.exibble).data_color(
GT(exibble).data_color(
columns=["num", "currency"],
palette=["red", "green"]
)
Expand All @@ -164,7 +164,7 @@ def data_color(
(so we'll set that to `"lightgray"`).

```{python}
gt.GT(gt.data.exibble).data_color(
GT(exibble).data_color(
columns="currency",
palette=["red", "green"],
domain=[0, 50],
Expand Down