Navigating VisiData¶
VisiData is a keyboard-driven program. Although you can use your mouse for some tasks, your keyboard will be your workhorse. Moving among a dataset’s rows and columns is no exception.
How to move one row/column at a time¶
You can use your keyboard’s arrow keys to navigate between columns.
Alternatively, you can use the h/j/k/l keys to move left/down/up/right. (That convention, like several others in VisiData, is borrowed from the vim text editor.)
When you first open a dataset in VisiData, you’ll start in the top-left corner:
File Edit View Column Row Data Plot System Help | VisiData 3.0.2 | Alt+H for help men OPERATOR │ ATYPE │ INCIDENT_DATE │ STATE │ AIRPORT │ PHASE_OF_FLT> BUSINESS │ PA-28 │ 05/22/15 00:00:00 │ FL │ VERO BEACH MUNICIP…│ APPROACH │ BUSINESS │ BE-1900 │ 06/18/15 00:00:00 │ AK │ KENAI MUNICIPAL AR…│ APPROACH │ BUSINESS │ PA-46 MALIBU │ 09/20/15 00:00:00 │ TX │ DAVID WAYNE HOOKS …│ │ DELTA AIR LINES │ B-717-200 │ 11/07/15 00:00:00 │ MO │ LAMBERT-ST LOUIS I…│ APPROACH │ BUSINESS │ BE-90 KING │ 12/17/15 00:00:00 │ FL │ POMPANO BEACH AIRP…│ LANDING ROLL │ DELTA AIR LINES │ B-757 │ 07/17/15 00:00:00 │ VI │ HENRY E ROHLSEN AR…│ │ DELTA AIR LINES │ B-717-200 │ 08/02/15 00:00:00 │ TX │ SAN ANTONIO INTL │ APPROACH │ BUSINESS │ C-414 │ 08/03/15 00:00:00 │ TX │ LONE STAR EXECUTIV…│ DEPARTURE │ ALLEGIANT AIR │ MD-80 │ 09/02/15 00:00:00 │ FL │ TAMPA INTL │ APPROACH │ TRANS STATES AIRLI…│ EMB-145 │ 09/07/15 00:00:00 │ MO │ LAMBERT-ST LOUIS I…│ APPROACH │ BUSINESS │ C-172 │ 11/28/15 00:00:00 │ FL │ OPA-LOCKA EXECUTIV…│ APPROACH │ GOVERNMENT │ EC120 │ 12/08/15 00:00:00 │ CA │ NORMAN Y. MINETA S…│ │ AMERICAN AIRLINES │ A-321 │ 05/06/15 00:00:00 │ FL │ FORT LAUDERDALE/HO…│ APPROACH │ EXPRESSJET AIRLINES│ CRJ100/200 │ 05/06/15 00:00:00 │ AR │ FORT SMITH REGIONA…│ CLIMB │ MESA AIRLINES │ CRJ900 │ 05/08/15 00:00:00 │ AR │ BILL AND HILLARY …│ LANDING ROLL │ BUSINESS │ HELICOPTER │ 05/06/15 00:00:00 │ │ UNKNOWN │ En Route │ DELTA AIR LINES │ A-320 │ 05/07/15 00:0┌──────────────────────────────────| statuses |─┐│ DELTA AIR LINES │ A-320 │ 05/08/15 00:0│ saul.pw/VisiData v3.0.2 ││ LUFTHANSA │ A-380 │ 05/10/15 00:0│ opening datasets/faa-wildlife-strikes.csv as ││ BUSINESS │ C-172 │ 05/08/15 00:0│ csv ││ SPIRIT AIRLINES │ A-319 │ 05/10/15 00:0└───────────────────────────────────────────────┘│ 1› faa-wildlife-strikes| 73448 rows
If you press the down-arrow and then the right-arrow (or, correspondingly, j and then l), you should see the row and column selectors move:
File Edit View Column Row Data Plot System Help | VisiData 3.0.2 | Alt+H for help men OPERATOR │ ATYPE │ INCIDENT_DATE │ STATE │ AIRPORT │ PHASE_OF_FLT> BUSINESS │ PA-28 │ 05/22/15 00:00:00 │ FL │ VERO BEACH MUNICIP…│ APPROACH │ BUSINESS │ BE-1900 │ 06/18/15 00:00:00 │ AK │ KENAI MUNICIPAL AR…│ APPROACH │ BUSINESS │ PA-46 MALIBU │ 09/20/15 00:00:00 │ TX │ DAVID WAYNE HOOKS …│ │ DELTA AIR LINES │ B-717-200 │ 11/07/15 00:00:00 │ MO │ LAMBERT-ST LOUIS I…│ APPROACH │ BUSINESS │ BE-90 KING │ 12/17/15 00:00:00 │ FL │ POMPANO BEACH AIRP…│ LANDING ROLL │ DELTA AIR LINES │ B-757 │ 07/17/15 00:00:00 │ VI │ HENRY E ROHLSEN AR…│ │ DELTA AIR LINES │ B-717-200 │ 08/02/15 00:00:00 │ TX │ SAN ANTONIO INTL │ APPROACH │ BUSINESS │ C-414 │ 08/03/15 00:00:00 │ TX │ LONE STAR EXECUTIV…│ DEPARTURE │ ALLEGIANT AIR │ MD-80 │ 09/02/15 00:00:00 │ FL │ TAMPA INTL │ APPROACH │ TRANS STATES AIRLI…│ EMB-145 │ 09/07/15 00:00:00 │ MO │ LAMBERT-ST LOUIS I…│ APPROACH │ BUSINESS │ C-172 │ 11/28/15 00:00:00 │ FL │ OPA-LOCKA EXECUTIV…│ APPROACH │ GOVERNMENT │ EC120 │ 12/08/15 00:00:00 │ CA │ NORMAN Y. MINETA S…│ │ AMERICAN AIRLINES │ A-321 │ 05/06/15 00:00:00 │ FL │ FORT LAUDERDALE/HO…│ APPROACH │ EXPRESSJET AIRLINES│ CRJ100/200 │ 05/06/15 00:00:00 │ AR │ FORT SMITH REGIONA…│ CLIMB │ MESA AIRLINES │ CRJ900 │ 05/08/15 00:00:00 │ AR │ BILL AND HILLARY …│ LANDING ROLL │ BUSINESS │ HELICOPTER │ 05/06/15 00:00:00 │ │ UNKNOWN │ En Route │ DELTA AIR LINES │ A-320 │ 05/07/15 00:00:00 │ CA │ METRO OAKLAND INTL │ │ DELTA AIR LINES │ A-320 │ 05/08/15 00:00:00 │ UT │ SALT LAKE CITY INTL│ │ LUFTHANSA │ A-380 │ 05/10/15 00:00:00 │ TX │ GEORGE BUSH INTERC…│ CLIMB │ BUSINESS │ C-172 │ 05/08/15 00:00:00 │ FL │ ORLANDO SANFORD IN…│ APPROACH │ SPIRIT AIRLINES │ A-319 │ 05/10/15 00:00:00 │ IL │ CHICAGO O'HARE INT…│ CLIMB │ 1› faa-wildlife-strikes| l go-right 73448 rows
How to move faster¶
You can use these keystrokes to move more than one column or row at a time:
Keystroke(s) | Moves cursor … |
---|---|
gj | to last row |
gk | to first row |
gh | to leftmost column |
gl | to rightmost column |
PageDown/Control-F | one page down (forward) |
PageUp/Control-B | one page up (backward) |
Note
What’s the deal with “g”?
As you learn to use VisiData, you’ll notice that many commands can be prefixed with g
. In general, prefixing a command with g
applies it more broadly. (You can think of g
as shorthand for “global.”)
Hence the above: h navigates one column to the left, while gh moves all the way to the left.
How to move via searching¶
In VisiData you can hop between columns using regular expressions. (If you’re not familiar with regular expressions, don’t worry; for the purposes here, you can just think of them as “search terms.”)
Note
Searches in VisiData are, by default, case-insensitive. You can change this in VisiData’s options by setting the regex_flags
value to an empty string (instead of the default I
).
To find a row, type these commands, followed by Enter:
Keystroke(s) | Action |
---|---|
/ + regex | Search forward in current column |
? + regex | Search backward in current column |
g/ + regex | Search forward in all columns |
g? + regex | Search backward in all columns |
Some VisiData commands, like the ones directly above, will prompt you to enter some text.
To demonstrate, move to the first column of the FAA dataset (if you’re not already there) and type /. At the bottom-left of the screen, you’ll see a prompt that says search regex:
:
search regex: / search-col 73448 rows
Then, type united
:
search regex: united / search-col 73448 rows
Then, press Enter. Your cursor should now be at the first row matching “united”:
File Edit View Column Row Data Plot System Help | VisiData 3.0.2 | Alt+H for help men OPERATOR │ ATYPE │ INCIDENT_DATE │ STATE │ AIRPORT │ PHASE_OF_FLT> AIR WISCONSIN AIRL…│ CRJ100/200 │ 05/09/15 00:00:00 │ NC │ PIEDMONT TRIAD INTL│ APPROACH │ SKYWEST AIRLINES │ CRJ100/200 │ 05/11/15 00:00:00 │ TX │ GEORGE BUSH INTERC…│ APPROACH │ HORIZON AIR │ DHC8 DASH 8 │ 05/10/15 00:00:00 │ OR │ PORTLAND INTL (OR) │ Climb │ EXPRESSJET AIRLINES│ CRJ100/200 │ 05/11/15 00:00:00 │ TN │ TRI-CITIES REGIONA…│ LANDING ROLL │ UPS AIRLINES │ MD-11 │ 05/12/15 00:00:00 │ CO │ DENVER INTL AIRPORT│ LANDING ROLL │ BUSINESS │ BE-200 KING │ 05/12/15 00:00:00 │ TX │ VALLEY INTL │ LANDING ROLL │ DELTA AIR LINES │ MD-90-30 │ 05/12/15 00:00:00 │ VA │ RICHMOND INTL │ TAKE-OFF RUN │ ALASKA AIRLINES │ B-737 │ 05/12/15 00:00:00 │ FL │ TAMPA INTL │ APPROACH │ AMERIFLIGHT │ BE-99 │ 05/13/15 00:00:00 │ OR │ SOUTHWEST OREGON R…│ APPROACH │ ENVOY AIR │ EMB-145 │ 05/14/15 00:00:00 │ TN │ LOVELL FIELD ARPT │ LANDING ROLL │ REPUBLIC AIRLINES │ EMB-170 │ 05/14/15 00:00:00 │ SC │ CHARLESTON AFB/INT…│ DEPARTURE │ HORIZON AIR │ DHC8 DASH 8 │ 05/14/15 00:00:00 │ AK │ FAIRBANKS INTL ARPT│ DEPARTURE │ SPIRIT AIRLINES │ A-319 │ 05/14/15 00:00:00 │ TX │ GEORGE BUSH INTERC…│ LANDING ROLL │ SHUTTLE AMERICA │ EMB-170 │ 05/12/15 00:00:00 │ ME │ PORTLAND INTL JETP…│ CLIMB │ AMERICAN AIRLINES │ MD-83 │ 05/14/15 00:00:00 │ CA │ LOS ANGELES INTL │ CLIMB │ BUSINESS │ DHC8 DASH 8 │ 05/13/15 00:00:00 │ VA │ ROANOKE REGNL ARPT…│ APPROACH │ BUSINESS │ C-172 │ 05/15/15 00:00:00 │ GA │ DEKALB-PEACHTREE A…│ DEPARTURE │ PIEDMONT AIRLINES │ DHC8 DASH 8 │ 05/16/15 00:00:00 │ VA │ CHARLOTTESVILLE-AL…│ DEPARTURE │ MESA AIRLINES │ CRJ700 │ 05/16/15 00:00:00 │ DC │ WASHINGTON DULLES …│ DEPARTURE │ BUSINESS │ C-340 │ 05/18/15 00:00:00 │ FL │ VERO BEACH MUNICIP…│ DEPARTURE │ UNITED AIRLINES │ B-737 │ 05/18/15 00:00:00 │ WA │ SEATTLE-TACOMA INTL│ APPROACH │ 1› faa-wildlife-strikes| / search-col 73448 rows
Once you’ve executed a search, you can cycle through all the matching rows:
Keystroke(s) | Action |
---|---|
n | Move to next matching row |
N | Move to previous matching row |
You can also jump between columns:
Keystroke(s) | Action |
---|---|
c + regex | Jump to the next matching column |
How to move to a specific row/column number¶
To jump to the nth row or column, you can use these commands:
Keystroke(s) | Action |
---|---|
zr + n | Jump to row number n |
zc + n | Jump to column number n |
How to move with your mouse¶
In addition to using your keyboard, you can use your mouse or trackpad to navigate between rows:
- Click a row to move the VisiData cursor to it
- Scroll to scroll through the rows
Tip
Feeling lost in a sheet? Press Control-g to display your cursor’s row and column number at the bottom of VisiData’s interface.