Skip to main content

Loading Multiple Formats

VisiData's power lies in its ability to open virtually any tabular format without writing a single line of code. This lesson covers the most common formats used in server and data engineering contexts.

Learning Focus

Know which pip extras are needed for each format and the specific options that control how each format is parsed (delimiter, encoding, header rows).

CSV and TSV

# CSV (comma-separated)
vd data.csv

# TSV (tab-separated)
vd data.tsv

# CSV with semicolon delimiter (common in EU locale files)
vd -f csv --csv-delimiter ';' data.csv

# CSV without header row
vd -f csv --header 0 data.csv

# CSV skipping first 2 rows (comments or metadata)
vd -f csv --skip 2 data.csv

# CSV with Windows line endings (usually auto-handled)
vd -f csv data.csv

JSON and JSONL

# Single JSON object or array
vd data.json

# JSONL / NDJSON (one object per line) — common for logs
vd events.jsonl
vd -f jsonl api_events.log

# Expand nested dict/list columns with (
# Move cursor to a column containing [3] or {key: val}
# Press ( to expand one level
# Press g( to expand all such columns

SQLite

# Open a SQLite database — shows table directory
vd site.sqlite

# Expected: list of tables in the file
# Press Enter to open a table as a sheet

# WordPress example
vd /var/www/html/wp-content/db.sqlite3
# Navigate to wp_posts, press Enter to open

Excel (XLSX)

# Requires: pip install openpyxl
vd report.xlsx

# Multi-sheet workbooks: use Shift+S to switch sheets
# Each worksheet opens as a separate VisiData sheet

Parquet

# Requires: pip install pyarrow
vd analytics.parquet

# Parquet files can be millions of rows — VisiData handles lazily

Fixed-Width Text

# Autodetects column boundaries from first 1000 rows
vd -f fixed report.txt

# Useful for system command output
ps aux | vd -f fixed --skip 1
netstat -tulnp | vd -f fixed
df -h | vd -f fixed --skip 1

# Adjust detection rows
vd -f fixed --fixed-rows 500 report.txt

Log Files

# Nginx access log (space/combined format)
vd /var/log/nginx/access.log

# Apache access log
vd -f fixed /var/log/apache2/access.log

# Syslog-style
vd /var/log/syslog

# Journal export
journalctl --since "1 hour ago" --no-pager | vd -f txt

HTML Tables

# Open a local HTML file and parse tables
vd -f html page.html

# Fetch a page with tables directly
vd https://en.wikipedia.org/wiki/List_of_countries_by_GDP

URLs

# Requires: pip install requests
vd https://raw.githubusercontent.com/datasets/covid-19/main/data/worldwide-aggregated.csv

# With explicit format
vd -f json https://api.github.com/repos/saulpw/visidata/releases

Format Option Reference

OptionDefaultDescription
--csv-delimiter,Field delimiter for CSV
--csv-quotechar"Quote character
--header1Number of rows to treat as column names
--skip0Number of rows to skip before header
--encodingutf-8-sigFile encoding
--max-rowsunlimitedLimit rows loaded
--fixed-rows1000Rows to sample for fixed-width detection

Troubleshooting Matrix

ProblemCauseFix
Columns all in oneWrong delimiter--csv-delimiter ';' or -f tsv
First row is data, not headerHeader misidentified--header 0
JSON opens as textMalformed JSONValidate with jq . file.json first
Excel import erroropenpyxl missingpip install openpyxl
Parquet import errorpyarrow missingpip install pyarrow
Encoding errorsLatin-1 file--encoding latin1

Hands-On Practice

# 1. Open CSV with a semicolon delimiter
echo "name;age;city\nAlice;29;Singapore\nBob;34;KL" > /tmp/semi.csv
vd -f csv --csv-delimiter ';' /tmp/semi.csv

# 2. Open process list as fixed-width
ps aux | vd -f fixed --skip 1

# 3. Open syslog
vd /var/log/syslog

# 4. Open nginx access log
vd /var/log/nginx/access.log

What's Next