257
TSV Files
Read a TSV File
tbl_preview() auto-detects .tsv and .tab files and reads them with tab-delimited parsing.
from great_docs import tbl_preview
tbl_preview('assets/cities.tsv', show_all=True)TSVRows8Columns4 | ||||
city str |
country str |
population i64 |
area_km2 i64 |
|
|---|---|---|---|---|
| 0 | Tokyo | Japan | 13960000 | 2194 |
| 1 | Delhi | India | 11030000 | 1484 |
| 2 | Shanghai | China | 24870000 | 6341 |
| 3 | São Paulo | Brazil | 12330000 | 1521 |
| 4 | Mexico City | Mexico | 9210000 | 1485 |
| 5 | Cairo | Egypt | 9540000 | 3085 |
| 6 | Mumbai | India | 12440000 | 603 |
| 7 | Beijing | China | 21540000 | 16411 |
The badge shows TSV and the header reports the correct row and column counts.