Skip to main content

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.

Learning Focus

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"
warning

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

KeyAction
/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
nNext search match
NPrevious search match
rJump to row by key value

Troubleshooting

ProblemCauseFix
Search finds nothingColumn type mismatchCast column type first (#, %, etc.)
Expression syntax errorTypo in Python exprPress Ctrl+C to cancel, try again
g/ too slow on large filesSearching millions of rowsUse z/ with a specific expression
Regex not matchingWrong regex syntaxTest with echo "text" | grep -P 'pattern'

What's Next