Adding and Deleting Rows
These commands change which rows exist in the sheet — adding new ones, deleting unwanted ones, and undoing mistakes.
Learning Focus
Use a to add one blank row, ga N to add many. Use d to delete one row, gd to delete all selected. Always press U to undo if you make a mistake.
warning
gd (delete all selected rows) has no confirmation dialog unless options.quitguard = True. Enable options.undo = True in .visidatarc to recover from accidental deletes.
Sample Data
order_id customer status amount region
1001 Alice active 250 sg
1002 Bob pending 150 kl
1003 Carol active 400 sg
1004 Dave error 0 jk
1005 Eve pending 320 kl
Add a Blank Row
a # append one blank row after current row
ga N # append N blank rows
# Move cursor to any row
a
A blank row appears after the cursor. Fill each cell with e (enter edit mode):
e # enter edit mode on the blank cell
# Type value → Tab → next cell → continue
Add multiple blank rows at once:
ga 5 # add 5 blank rows
Delete a Row
d # delete current row
gd # delete all selected rows (bulk)
# Delete a single row
# Move cursor to the row
d
# Delete all selected rows
# Select rows first (see Row Selection)
| # Enter: error
gd # delete all error rows
# Undo if needed
U
Undo and Redo
U # undo most recent modification
R # redo most recent undo
Undo requires options.undo = True in your .visidatarc file:
# In ~/.visidatarc:
options.undo = True
Quick Reference
| Key | Action |
|---|---|
a | Append one blank row after current row |
ga N | Append N blank rows |
d | Delete current row |
gd | Delete all selected rows (no confirmation) |
U | Undo most recent modification |
R | Redo most recent undo |
Hands-On Practice
vd ~/github/practice-folder/visidata/01-loading/01-employees.csv
# 1. Add a row: move cursor → a → fill cells with e
# 2. Add 3 rows: ga 3 → fill them
# 3. Delete a row: move to it → d
# 4. Select rows with error: | → error → gd → U to undo
What's Next
- Copying and Pasting Rows — yank, paste, cut, cell copy
- Row Selection — select rows by pattern, expression, value