# TSV Files


# Read a TSV File

`tbl_preview()` auto-detects `.tsv` and `.tab` files and reads them with tab-delimited parsing.


    257


``` python
from great_docs import tbl_preview

tbl_preview('assets/cities.tsv', show_all=True)
```


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

city

<em>str</em>

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

country

<em>str</em>

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

population

<em>i64</em>

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

area_km2

<em>i64</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: 126px">Tokyo</td>
<td class="gt_row gt_left" style="max-width: 102px">Japan</td>
<td class="gt_row gt_right" style="max-width: 125px">13960000</td>
<td class="gt_row gt_right" style="max-width: 109px">2194</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">1</td>
<td class="gt_row gt_left" style="max-width: 126px">Delhi</td>
<td class="gt_row gt_left" style="max-width: 102px">India</td>
<td class="gt_row gt_right" style="max-width: 125px">11030000</td>
<td class="gt_row gt_right" style="max-width: 109px">1484</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">2</td>
<td class="gt_row gt_left" style="max-width: 126px">Shanghai</td>
<td class="gt_row gt_left" style="max-width: 102px">China</td>
<td class="gt_row gt_right" style="max-width: 125px">24870000</td>
<td class="gt_row gt_right" style="max-width: 109px">6341</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">3</td>
<td class="gt_row gt_left" style="max-width: 126px">São Paulo</td>
<td class="gt_row gt_left" style="max-width: 102px">Brazil</td>
<td class="gt_row gt_right" style="max-width: 125px">12330000</td>
<td class="gt_row gt_right" style="max-width: 109px">1521</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">4</td>
<td class="gt_row gt_left" style="max-width: 126px">Mexico City</td>
<td class="gt_row gt_left" style="max-width: 102px">Mexico</td>
<td class="gt_row gt_right" style="max-width: 125px">9210000</td>
<td class="gt_row gt_right" style="max-width: 109px">1485</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">5</td>
<td class="gt_row gt_left" style="max-width: 126px">Cairo</td>
<td class="gt_row gt_left" style="max-width: 102px">Egypt</td>
<td class="gt_row gt_right" style="max-width: 125px">9540000</td>
<td class="gt_row gt_right" style="max-width: 109px">3085</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">6</td>
<td class="gt_row gt_left" style="max-width: 126px">Mumbai</td>
<td class="gt_row gt_left" style="max-width: 102px">India</td>
<td class="gt_row gt_right" style="max-width: 125px">12440000</td>
<td class="gt_row gt_right" style="max-width: 109px">603</td>
</tr>
<tr>
<td class="gt_row gt_right gd-tbl-rownum">7</td>
<td class="gt_row gt_left" style="max-width: 126px">Beijing</td>
<td class="gt_row gt_left" style="max-width: 102px">China</td>
<td class="gt_row gt_right" style="max-width: 125px">21540000</td>
<td class="gt_row gt_right" style="max-width: 109px">16411</td>
</tr>
</tbody>
</table>


The badge shows **TSV** and the header reports the correct row and column counts.
