diff --git a/docs/get-started/controls-click-actions.qmd b/docs/get-started/controls-click-actions.qmd index d9f8452..a9bec47 100644 --- a/docs/get-started/controls-click-actions.qmd +++ b/docs/get-started/controls-click-actions.qmd @@ -14,15 +14,13 @@ You can add cell click actions using the onClick argument, which accepts the fol import htmltools from reactable import Reactable, Column, JS, embed_css -from reactable.data import cars_93 -from palmerpenguins import load_penguins +from reactable.data import cars_93, penguins import polars as pl embed_css() -penguins = load_penguins() -pl_penguins = pl.from_pandas(penguins) +pl_penguins = penguins.to_polars() ``` diff --git a/docs/get-started/controls-sorting.qmd b/docs/get-started/controls-sorting.qmd index 575612c..1a1c0db 100644 --- a/docs/get-started/controls-sorting.qmd +++ b/docs/get-started/controls-sorting.qmd @@ -5,15 +5,14 @@ jupyter: python3 ```{python} from reactable import Reactable, Column, embed_css +from reactable.data import penguins -from palmerpenguins import load_penguins import polars as pl embed_css() -penguins = load_penguins() -pl_penguins = pl.from_pandas(penguins) +pl_penguins = penguins.to_polars() ``` Tables are sortable by default. You can sort a column by clicking on its header, or sort multiple columns by holding the shift key while sorting. diff --git a/docs/get-started/structure-column-groups.qmd b/docs/get-started/structure-column-groups.qmd index a7086e3..71bda63 100644 --- a/docs/get-started/structure-column-groups.qmd +++ b/docs/get-started/structure-column-groups.qmd @@ -6,10 +6,9 @@ title: Column headers import polars as pl from reactable import Reactable, Column, ColGroup, embed_css -from palmerpenguins import load_penguins +from reactable.data import penguins -penguins = load_penguins() -pl_penguins = pl.from_pandas(penguins) +pl_penguins = penguins.to_polars() embed_css() ``` diff --git a/docs/get-started/structure-details.qmd b/docs/get-started/structure-details.qmd index ac9d0e1..24b7f74 100644 --- a/docs/get-started/structure-details.qmd +++ b/docs/get-started/structure-details.qmd @@ -4,15 +4,14 @@ title: Expandable details ```{python} from reactable import Reactable, Column, ColFormat, JS, embed_css +from reactable.data import penguins -from palmerpenguins import load_penguins import polars as pl embed_css() -penguins = load_penguins() -pl_penguins = pl.from_pandas(penguins) +pl_penguins = penguins.to_polars() ``` You can make rows expandable with additional content through details, which takes an Python or JavaScript render function. See [Custom Rendering](./format-custom-rendering.qmd) for details on how to use render functions.