---
title: table manipulation
output: html
jupyter: python3
---

```{python}
import great_tables as gt
from great_tables import exibble, countrypops, gtcars  # , md, html

from siuba import *

```


```{python}
res = gtcars >> select(_.mfr, _.model, _.msrp) >> _.head(5)
# TODO: Make `md()` work
gt.GT(res).tab_header(
    title="Data listing from **gtcars**", subtitle="`gtcars` is an R dataset"
).fmt_number(columns="msrp", decimals=2, scale_by=1 / 10000)
```


```{python}
gt.GT(exibble.iloc[[4, 3, 7, 1],], groupname_col="group")
```


```{python}
# | eval: false
res = gtcars >> select(_.mfr, _.model, _.msrp) >> _.head(5)

# TODO: Make `html()` work
gt.GT(res).tab_header(
    title=html("Data listing from <strong>gtcars</strong>"),
    subtitle=html("From <span style='color:red;'>gtcars</span>"),
)

```
