What is VisiData
VisiData is an interactive multitool for tabular data that runs entirely in your terminal. It reads virtually any structured data format, presents it as a navigable spreadsheet-like sheet, and lets you reshape, filter, and analyze data using only keyboard commands — no mouse, no GUI, no waiting.
Use this lesson to build VisiData's core mental model: everything is a sheet, every sheet lives in a stack, and every transformation generates a derived sheet — not a destructive edit.
- Command:
vdorvisidata - Language: Python (GPLv3)
- Formats: CSV, TSV, JSON, SQLite, Parquet, Excel, fixed-width, logs, URLs, and more
- Version (stable): v3.3 (2025)
- Config file:
~/.visidatarc - Help inside VisiData:
Ctrl+H(man page),Alt+H(menu)
The Problem VisiData Solves
Imagine you have a CSV file with 500,000 rows. Opening it in Excel takes 45 seconds and may freeze your machine. With VisiData, the same file opens instantly — because VisiData loads data lazily (only what's visible on screen).
Opening a large CSV in a GUI spreadsheet:
$ open 500k_rows.csv → 45 seconds loading
filter one column → application freezes
format change → out-of-memory warning
Opening the same file in VisiData:
$ vd 500k_rows.csv → loaded instantly (lazy loading)
Shift+F → frequency table in <1 second
q → back to source sheet instantly
How VisiData Is Structured
Every file you open is a sheet. Every transformation (frequency table, pivot, summary) pushes a new derived sheet on top. Press q to pop back. Nothing destroys the original.
Source Sheet ──Shift+F──▶ Frequency Table ──q──▶ back
──Shift+W──▶ Pivot Table ──q──▶ back
──Shift+I──▶ Describe Sheet ──q──▶ back
For the full sheet stack model, see Sheet Stack and Prefix Keys.
What VisiData Looks Like
Suppose you open a simple CSV file of employees:
name,city,department,salary
Alice,Jakarta,Engineering,90000
Bob,Bandung,Marketing,70000
Charlie,Jakarta,Engineering,85000
Dina,Surabaya,HR,60000
Inside VisiData it looks like this:
┌──────────────────────────────────────────────────────────┐
│ name │ city │ department │ salary │ ← Header row
│──────────────┼──────────────┼──────────────┼──────────────│
│ Alice │ Jakarta │ Engineering │ 90000 │ ← Cursor row (highlighted)
│ Bob │ Bandung │ Marketing │ 70000 │
│ Charlie │ Jakarta │ Engineering │ 85000 │
│ Dina │ Surabaya │ HR │ 60000 │
│──────────────────────────────────────────────────────────│
│ employees.csv │ 4 rows │ name │ ← Status bar
└──────────────────────────────────────────────────────────┘
Key interface elements:
- Header row — column names (press
^to rename any column) - Cursor row — the currently highlighted row your cursor is on
- Status bar — shows sheet name, total row count, current column name
Why Operators Use VisiData
| Need | VisiData capability | Practical effect |
|---|---|---|
| Fast large-file inspection | Lazy loading, 1M+ rows | No GUI freeze |
| Filter/slice data | Row selection, regex, Python expr | Replace grep+awk pipelines |
| Data type casting | ~#%$@ type keys | Instant int/float/date coercion |
| Frequency analysis | Shift+F frequency table | Instant histogram |
| Data export | Ctrl+S to any format | CSV → JSON → SQLite in seconds |
| Repeatability | CommandLog replay | Documented, reproducible transforms |
| Custom logic | Python expressions in columns | Full pandas-like power in-terminal |
VisiData vs Alternatives
| Feature | VisiData | csvkit | Miller | pandas |
|---|---|---|---|---|
| Interactive TUI | ✅ | ❌ | ❌ | ❌ |
| 1M+ rows | ✅ | ✅ | ✅ | ✅ (with RAM) |
| Multi-format | ✅ 40+ | Limited | TSV/CSV/JSON | ✅ |
| Python expressions | ✅ | ❌ | ❌ | ✅ |
| In-terminal graphs | ✅ | ❌ | ❌ | ❌ |
| Learning curve | Medium | Low | Medium | High |
VisiData is the best choice when you need interactive, visual exploration of data without leaving the terminal.
Common Beginner Mistakes
| Mistake | What happens | Fix |
|---|---|---|
Pressing q to quit VisiData | Only closes current sheet | Use gq to quit all |
| Editing cells unintentionally | Pressing e enters edit mode | Press Ctrl+C to cancel |
| Losing the source sheet | Navigating derived sheets | Press Shift+S to see all sheets |
| Confusing column types | Numbers treated as strings | Set type with # (int) or % (float) |
Basic Commands Overview
# Open a file
vd ~/github/practice-folder/visidata/01-loading/01-employees.csv
vd ~/github/practice-folder/visidata/05-logs/01-access.log
vd ~/github/practice-folder/visidata/08-sysadmin/site.sqlite
# Inside VisiData:
# q quit current sheet
# gq quit all sheets (exit VisiData)
# Ctrl+H open man page / full reference
# Alt+H open help menu
# Shift+S open Sheets Sheet (see all open sheets)
Hands-On Practice
# Create the sample file
cat > ~/github/practice-folder/visidata/01-loading/01-employees.csv << 'EOF'
name,city,department,salary
Alice,Jakarta,Engineering,90000
Bob,Bandung,Marketing,70000
Charlie,Jakarta,Engineering,85000
Dina,Surabaya,HR,60000
EOF
# Open it
vd ~/github/practice-folder/visidata/01-loading/01-employees.csv
# Try these inside VisiData:
# hjkl or arrow keys — move around
# Shift+F — frequency table on current column (try on 'department')
# q — return to source sheet
# gq — quit VisiData