Search and Jump
VisiData has three search modes: regex search in the current column, regex search across all columns, and Python expression search. Each serves a different precision need.
Learn the difference between / (column search), g/ (all columns), and z/ (Python expression). These three cover every data-finding scenario.
Search in the Current Column (/)
Press /, type a pattern, and press Enter. The cursor jumps to the first row where that column matches.
# Move cursor to 'status' column
/
# Enter: error
# Cursor moves to the first row with status='error'
/ regex search forward in current column
? regex search backward in current column
n go to next match
N go to previous match
Search Across All Columns (g/)
When you don't know which column contains the value, use g/ to search all visible columns at once.
g/
# Enter: example.com
# Cursor moves to the first row where ANY column matches
Press n → next row with match in any column. Press N → previous.
Search Using Python Expression (z/)
For complex conditions that regex can't express, use z/ with a Python expression.
# Find rows where amount exceeds 300
z/
# Enter: amount > 300
# Find rows where amount is zero
z/
# Enter: amount == 0
# Find rows where customer name starts with 'E'
z/
# Enter: customer.startswith('E')
# Find large active orders
z/
# Enter: amount > 500 and status == "active"
Python expression search requires the column to have the correct type. If amount is a string, amount > 300 does string comparison. Cast to % (float) first.
Jump to a Row by Key Value (r)
Jump to the next row whose key column matches a regex:
# First set a key column
# Move to 'customer' column, press !
# Then:
r
# Enter: Carol
# Cursor jumps to Carol's row
Search Decision Guide
Need to find something?
├── Know which column? → / regex search current column only
├── Unknown column? → g/ regex search ALL visible columns
└── Need logic/comparison? → z/ Python expression search
After match:
n → next match
N → previous match
Key Reference
| Key | Action |
|---|---|
/ | Search forward in current column |
? | Search backward in current column |
g/ | Search forward in ALL visible columns |
g? | Search backward in ALL visible columns |
z/ | Search forward by Python expression |
z? | Search backward by Python expression |
n | Next search match |
N | Previous search match |
r | Jump to row by key value |
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| Search finds nothing | Column type mismatch | Cast column type first (#, %, etc.) |
| Expression syntax error | Typo in Python expr | Press Ctrl+C to cancel, try again |
g/ too slow on large files | Searching millions of rows | Use z/ with a specific expression |
| Regex not matching | Wrong regex syntax | Test with echo "text" | grep -P 'pattern' |
What's Next
- Sheet Stack and Split — navigating between sheets, split screen
- Row Selection — select rows by pattern, expression, value