# All Options


# Minimal Chrome

Turn off every optional element -- no row numbers, no dtypes, no dimension badges:


``` python
from great_docs import tbl_preview
from gdtest_tbl_preview import sample_scores

tbl_preview(
    sample_scores(8),
    show_row_numbers=False,
    show_dtypes=False,
    show_dimensions=False,
    show_all=True,
)
```


| name    | subject | score | grade | passed |
|---------|---------|-------|-------|--------|
| Bob     | Math    | 70.3  | A+    | True   |
| Alice   | Art     | 41.6  | A-    | False  |
| Eve     | History | 51.9  | C+    | False  |
| Diana   | Math    | 79    | B-    | True   |
| Diana   | Math    | 72.7  | B     | True   |
| Charlie | Math    | 53.2  | A-    | False  |
| Bob     | Science | 75.4  | B+    | True   |
| Iris    | Science | 88.6  | B-    | True   |


# Full Chrome with Caption

Everything enabled plus a caption:


``` python
tbl_preview(
    sample_scores(50),
    n_head=10,
    n_tail=5,
    caption="Top & bottom of the class roster",
)
```


<table class="gt_table" data-quarto-disable-processing="true" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="6" class="gt_heading gt_title gt_font_normal"><div style="padding-top: 0; padding-bottom: 7px;">
<span class="gd-tbl-badge" style="background-color: #F0F0F0; color: #333333; border: 1px solid #F0F0F0; margin-right: 8px;">Table</span>Rows50Columns5
</div></th>
</tr>
<tr class="gt_heading">
<th colspan="6" class="gt_heading gt_subtitle gt_font_normal">Top & bottom of the class roster</th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_right" scope="col"></th>
<th id="name" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

name

<em>str</em>

</div></th>
<th id="subject" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

subject

<em>str</em>

</div></th>
<th id="score" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col"><div>

score

<em>f64</em>

</div></th>
<th id="grade" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

grade

<em>str</em>

</div></th>
<th id="passed" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

passed

<em>bool</em>

</div></th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<td class="gt_row gt_right gd-tbl-rownum">0</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">English</td>
<td class="gt_row gt_right" style="max-width: 86px">54.8</td>
<td class="gt_row gt_left" style="max-width: 86px">B</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">1</td>
<td class="gt_row gt_left" style="max-width: 97px">Alice</td>
<td class="gt_row gt_left" style="max-width: 102px">Art</td>
<td class="gt_row gt_right" style="max-width: 86px">73.7</td>
<td class="gt_row gt_left" style="max-width: 86px">B+</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">2</td>
<td class="gt_row gt_left" style="max-width: 97px">Eve</td>
<td class="gt_row gt_left" style="max-width: 102px">English</td>
<td class="gt_row gt_right" style="max-width: 86px">55.8</td>
<td class="gt_row gt_left" style="max-width: 86px">A+</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">3</td>
<td class="gt_row gt_left" style="max-width: 97px">Diana</td>
<td class="gt_row gt_left" style="max-width: 102px">Art</td>
<td class="gt_row gt_right" style="max-width: 86px">75.1</td>
<td class="gt_row gt_left" style="max-width: 86px">B+</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">4</td>
<td class="gt_row gt_left" style="max-width: 97px">Diana</td>
<td class="gt_row gt_left" style="max-width: 102px">Science</td>
<td class="gt_row gt_right" style="max-width: 86px">93.9</td>
<td class="gt_row gt_left" style="max-width: 86px">F</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">5</td>
<td class="gt_row gt_left" style="max-width: 97px">Charlie</td>
<td class="gt_row gt_left" style="max-width: 102px">Math</td>
<td class="gt_row gt_right" style="max-width: 86px">64</td>
<td class="gt_row gt_left" style="max-width: 86px">A</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">6</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">Math</td>
<td class="gt_row gt_right" style="max-width: 86px">53.2</td>
<td class="gt_row gt_left" style="max-width: 86px">A</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">7</td>
<td class="gt_row gt_left" style="max-width: 97px">Iris</td>
<td class="gt_row gt_left" style="max-width: 102px">Science</td>
<td class="gt_row gt_right" style="max-width: 86px">99.9</td>
<td class="gt_row gt_left" style="max-width: 86px">C</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">8</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">English</td>
<td class="gt_row gt_right" style="max-width: 86px">70.6</td>
<td class="gt_row gt_left" style="max-width: 86px">A</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr class="gd-tbl-divider">
<td class="gt_row gt_right gd-tbl-rownum">9</td>
<td class="gt_row gt_left" style="max-width: 97px">Jack</td>
<td class="gt_row gt_left" style="max-width: 102px">Math</td>
<td class="gt_row gt_right" style="max-width: 86px">45.5</td>
<td class="gt_row gt_left" style="max-width: 86px">D</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">45</td>
<td class="gt_row gt_left" style="max-width: 97px">Iris</td>
<td class="gt_row gt_left" style="max-width: 102px">History</td>
<td class="gt_row gt_right" style="max-width: 86px">40</td>
<td class="gt_row gt_left" style="max-width: 86px">B-</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">46</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">History</td>
<td class="gt_row gt_right" style="max-width: 86px">59.4</td>
<td class="gt_row gt_left" style="max-width: 86px">A</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">47</td>
<td class="gt_row gt_left" style="max-width: 97px">Grace</td>
<td class="gt_row gt_left" style="max-width: 102px">Science</td>
<td class="gt_row gt_right" style="max-width: 86px">41.2</td>
<td class="gt_row gt_left" style="max-width: 86px">D</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">48</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">English</td>
<td class="gt_row gt_right" style="max-width: 86px">95.7</td>
<td class="gt_row gt_left" style="max-width: 86px">B+</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">49</td>
<td class="gt_row gt_left" style="max-width: 97px">Iris</td>
<td class="gt_row gt_left" style="max-width: 102px">Science</td>
<td class="gt_row gt_right" style="max-width: 86px">92.7</td>
<td class="gt_row gt_left" style="max-width: 86px">B</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
</tbody>
</table>


# Custom Column Width

Restrict columns to 120px max width:


``` python
tbl_preview(
    sample_scores(15),
    max_col_width=120,
    min_tbl_width=400,
)
```


<table class="gt_table" data-quarto-disable-processing="true" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="6" class="gt_heading gt_title gt_font_normal"><div style="padding-top: 0; padding-bottom: 7px;">
<span class="gd-tbl-badge" style="background-color: #F0F0F0; color: #333333; border: 1px solid #F0F0F0; margin-right: 8px;">Table</span>Rows15Columns5
</div></th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_right" scope="col"></th>
<th id="name" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

name

<em>str</em>

</div></th>
<th id="subject" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

subject

<em>str</em>

</div></th>
<th id="score" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col"><div>

score

<em>f64</em>

</div></th>
<th id="grade" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

grade

<em>str</em>

</div></th>
<th id="passed" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

passed

<em>bool</em>

</div></th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<td class="gt_row gt_right gd-tbl-rownum">0</td>
<td class="gt_row gt_left" style="max-width: 65px">Bob</td>
<td class="gt_row gt_left" style="max-width: 84px">Science</td>
<td class="gt_row gt_right" style="max-width: 68px">60.4</td>
<td class="gt_row gt_left" style="max-width: 68px">F</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">1</td>
<td class="gt_row gt_left" style="max-width: 65px">Alice</td>
<td class="gt_row gt_left" style="max-width: 84px">Art</td>
<td class="gt_row gt_right" style="max-width: 68px">49.3</td>
<td class="gt_row gt_left" style="max-width: 68px">B-</td>
<td class="gt_row gt_left" style="max-width: 76px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">2</td>
<td class="gt_row gt_left" style="max-width: 65px">Eve</td>
<td class="gt_row gt_left" style="max-width: 84px">Art</td>
<td class="gt_row gt_right" style="max-width: 68px">97.4</td>
<td class="gt_row gt_left" style="max-width: 68px">F</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">3</td>
<td class="gt_row gt_left" style="max-width: 65px">Diana</td>
<td class="gt_row gt_left" style="max-width: 84px">Math</td>
<td class="gt_row gt_right" style="max-width: 68px">60.2</td>
<td class="gt_row gt_left" style="max-width: 68px">B+</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
<tr class="gd-tbl-divider">
<td class="gt_row gt_right gd-tbl-rownum">4</td>
<td class="gt_row gt_left" style="max-width: 65px">Diana</td>
<td class="gt_row gt_left" style="max-width: 84px">Art</td>
<td class="gt_row gt_right" style="max-width: 68px">45.6</td>
<td class="gt_row gt_left" style="max-width: 68px">A</td>
<td class="gt_row gt_left" style="max-width: 76px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">10</td>
<td class="gt_row gt_left" style="max-width: 65px">Grace</td>
<td class="gt_row gt_left" style="max-width: 84px">Art</td>
<td class="gt_row gt_right" style="max-width: 68px">72.2</td>
<td class="gt_row gt_left" style="max-width: 68px">A</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">11</td>
<td class="gt_row gt_left" style="max-width: 65px">Alice</td>
<td class="gt_row gt_left" style="max-width: 84px">English</td>
<td class="gt_row gt_right" style="max-width: 68px">98.4</td>
<td class="gt_row gt_left" style="max-width: 68px">C+</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">12</td>
<td class="gt_row gt_left" style="max-width: 65px">Alice</td>
<td class="gt_row gt_left" style="max-width: 84px">Math</td>
<td class="gt_row gt_right" style="max-width: 68px">62.7</td>
<td class="gt_row gt_left" style="max-width: 68px">B</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">13</td>
<td class="gt_row gt_left" style="max-width: 65px">Bob</td>
<td class="gt_row gt_left" style="max-width: 84px">Science</td>
<td class="gt_row gt_right" style="max-width: 68px">73.1</td>
<td class="gt_row gt_left" style="max-width: 68px">C</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">14</td>
<td class="gt_row gt_left" style="max-width: 65px">Diana</td>
<td class="gt_row gt_left" style="max-width: 84px">History</td>
<td class="gt_row gt_right" style="max-width: 68px">89.8</td>
<td class="gt_row gt_left" style="max-width: 68px">B-</td>
<td class="gt_row gt_left" style="max-width: 76px">True</td>
</tr>
</tbody>
</table>


# Side-by-Side Comparison

Default Pandas output vs. `tbl_preview()` on the same data:


|     | name    | subject | score | grade | passed |
|-----|---------|---------|-------|-------|--------|
| 0   | Bob     | History | 51.9  | A-    | False  |
| 1   | Alice   | Math    | 79.0  | B+    | True   |
| 2   | Eve     | Math    | 72.7  | B-    | True   |
| 3   | Diana   | Math    | 53.2  | A     | False  |
| 4   | Diana   | Science | 75.4  | A     | True   |
| 5   | Charlie | Science | 88.6  | C+    | True   |
| 6   | Bob     | Art     | 40.4  | A     | False  |
| 7   | Iris    | Art     | 88.3  | B-    | True   |
| 8   | Bob     | Math    | 81.9  | B-    | True   |
| 9   | Jack    | Art     | 60.4  | F     | True   |


<table class="gt_table" data-quarto-disable-processing="true" data-quarto-bootstrap="false">
<thead>
<tr class="gt_heading">
<th colspan="6" class="gt_heading gt_title gt_font_normal"><div style="padding-top: 0; padding-bottom: 7px;">
<span class="gd-tbl-badge" style="background-color: #150458; color: #FFFFFF; border: 1px solid #150458; margin-right: 8px;">Pandas</span>Rows10Columns5
</div></th>
</tr>
<tr class="gt_col_headings">
<th class="gt_col_heading gt_columns_bottom_border gt_right" scope="col"></th>
<th id="name" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

name

<em>str</em>

</div></th>
<th id="subject" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

subject

<em>str</em>

</div></th>
<th id="score" class="gt_col_heading gt_columns_bottom_border gt_right" scope="col"><div>

score

<em>f64</em>

</div></th>
<th id="grade" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

grade

<em>str</em>

</div></th>
<th id="passed" class="gt_col_heading gt_columns_bottom_border gt_left" scope="col"><div>

passed

<em>bool</em>

</div></th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr>
<td class="gt_row gt_right gd-tbl-rownum">0</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">History</td>
<td class="gt_row gt_right" style="max-width: 86px">51.9</td>
<td class="gt_row gt_left" style="max-width: 86px">A-</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">1</td>
<td class="gt_row gt_left" style="max-width: 97px">Alice</td>
<td class="gt_row gt_left" style="max-width: 102px">Math</td>
<td class="gt_row gt_right" style="max-width: 86px">79</td>
<td class="gt_row gt_left" style="max-width: 86px">B+</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">2</td>
<td class="gt_row gt_left" style="max-width: 97px">Eve</td>
<td class="gt_row gt_left" style="max-width: 102px">Math</td>
<td class="gt_row gt_right" style="max-width: 86px">72.7</td>
<td class="gt_row gt_left" style="max-width: 86px">B-</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">3</td>
<td class="gt_row gt_left" style="max-width: 97px">Diana</td>
<td class="gt_row gt_left" style="max-width: 102px">Math</td>
<td class="gt_row gt_right" style="max-width: 86px">53.2</td>
<td class="gt_row gt_left" style="max-width: 86px">A</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">4</td>
<td class="gt_row gt_left" style="max-width: 97px">Diana</td>
<td class="gt_row gt_left" style="max-width: 102px">Science</td>
<td class="gt_row gt_right" style="max-width: 86px">75.4</td>
<td class="gt_row gt_left" style="max-width: 86px">A</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">5</td>
<td class="gt_row gt_left" style="max-width: 97px">Charlie</td>
<td class="gt_row gt_left" style="max-width: 102px">Science</td>
<td class="gt_row gt_right" style="max-width: 86px">88.6</td>
<td class="gt_row gt_left" style="max-width: 86px">C+</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">6</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">Art</td>
<td class="gt_row gt_right" style="max-width: 86px">40.4</td>
<td class="gt_row gt_left" style="max-width: 86px">A</td>
<td class="gt_row gt_left" style="max-width: 94px">False</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">7</td>
<td class="gt_row gt_left" style="max-width: 97px">Iris</td>
<td class="gt_row gt_left" style="max-width: 102px">Art</td>
<td class="gt_row gt_right" style="max-width: 86px">88.3</td>
<td class="gt_row gt_left" style="max-width: 86px">B-</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">8</td>
<td class="gt_row gt_left" style="max-width: 97px">Bob</td>
<td class="gt_row gt_left" style="max-width: 102px">Math</td>
<td class="gt_row gt_right" style="max-width: 86px">81.9</td>
<td class="gt_row gt_left" style="max-width: 86px">B-</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">9</td>
<td class="gt_row gt_left" style="max-width: 97px">Jack</td>
<td class="gt_row gt_left" style="max-width: 102px">Art</td>
<td class="gt_row gt_right" style="max-width: 86px">60.4</td>
<td class="gt_row gt_left" style="max-width: 86px">F</td>
<td class="gt_row gt_left" style="max-width: 94px">True</td>
</tr>
</tbody>
</table>
