Skip to content

Commit

Permalink
Merge pull request #408 from jrycw/update-docs
Browse files Browse the repository at this point in the history
docs: Mention support for `Polars` in the `get-started` section
  • Loading branch information
machow authored Aug 26, 2024
2 parents 7365aaa + 3d65e0b commit f819dea
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ quartodoc:
- vals.fmt_markdown
- title: Built in datasets
desc: >
The **Great Tables** package is equipped with ten datasets that come in all shapes and
The **Great Tables** package is equipped with sixteen datasets that come in all shapes and
sizes. Many examples thoughout the help docs use these datasets to quickly demonstrate the
awesome features of the package!
contents:
Expand Down
21 changes: 21 additions & 0 deletions docs/get-started/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,27 @@ gt_tbl

That doesn't look too bad! Sure, it's basic but we really didn't really ask for much. We did receive a proper table with column labels and the data. Oftentimes however, you'll want a bit more: a **Table header**, a **Stub**, and sometimes *source notes* in the **Table Footer** component.

## **Polars** DataFrame support

`GT` accepts both **Pandas** and **Polars** DataFrames. You can pass a **Polars** DataFrame to `GT`, or use its `DataFrame.style` property.

```{python}
import polars as pl
df_polars = pl.from_pandas(islands_mini)
# Approach 1: call GT ----
GT(df_polars)
# Approach 2: Polars style property ----
df_polars.style
```

:::{.callout-note}
The `polars.DataFrame.style` property is currently considered [unstable](https://docs.pola.rs/api/python/stable/reference/dataframe/style.html#polars.DataFrame.style), and may change in the future. Using `GT` on a **Polars** DataFrame will always work.
:::


## Some Beautiful Examples

In the following pages we'll use **Great Tables** to turn DataFrames into beautiful tables, like the ones below.
Expand Down

0 comments on commit f819dea

Please sign in to comment.