Columns Sheet Operations
The Columns Sheet (Shift+C) is a regular VisiData sheet where each row represents one column from your source sheet. This means all the selection, editing, and movement keys you already know work here too — but they operate on column metadata instead of row data.
Learning Focus
The Columns Sheet excels at bulk operations: set types on 10 columns at once, hide internal columns, or set the same aggregator on multiple numeric columns in one step.
Opening the Columns Sheet
Shift+C # opens Columns Sheet — each row = one column from the source sheet
Columns Sheet columns:
| Column | Description |
|---|---|
name | Column name (editable) |
width | Display width in characters |
type | Column type (str, int, float, currency, date, len) |
key | Whether it is a key column (!) |
aggregator | Aggregator for pivot/frequency (sum, mean, etc.) |
expr | Python expression (for derived columns) |
Navigating and Returning
Enter # jump to that column in the source sheet
q # return to the source sheet
Editing a Single Property (e)
e # edit the cell under cursor
# Rename a column
# Move to its 'name' cell
e
# Type new name → Enter
# Change width
# Move to its 'width' cell
e
# Type new width → Enter
# Set type by typing the name
# Move to its 'type' cell
e
# Type: int → Enter
Bulk Operations
Select rows first, then apply an action to all selected column rows.
Selecting Rows
s # select the current row (column)
gs # select all rows
| # regex select rows by column name pattern
# Enter: salary|amount|cost
Bulk Set Type
g~ # set type = str for selected columns
g# # set type = int for selected columns
g% # set type = float for selected columns
g$ # set type = currency for selected columns
g@ # set type = date for selected columns
gz# # set type = len for selected columns
# Select all numeric columns
|
# Enter: salary|amount|cost
# Set all to float
g%
q # return to source — all are now float
Bulk Toggle Key Columns
g! # toggle key status for selected columns
gz! # remove key for selected columns
# Select identifier columns
|
# Enter: id|name|hostname
# Mark all as key columns
g!
q # return to source — marked columns are now blue
Bulk Set Aggregator
g+ <aggregator> # set aggregator for selected columns
# Select all numeric columns
|
# Enter: salary|amount|cost|price
# Set mean for all
g+ mean
q # return to source
# Open pivot: Shift+W → shows mean per group
Bulk Hide Columns
g- # hide selected columns (sets width to 0)
# Select metadata columns
|
# Enter: created_at|updated_at|internal_ref
# Hide them
g-
q # return to source — they are gone from view
# To show them again (from source sheet):
gv
Delete, Copy, Paste Columns
d # delete the current column row (removes column from source)
Y # yank (copy) the current column row
gY # yank all selected column rows
gP # paste yanked column(s) back
# Delete a column
# Move to its row
d
# Copy a column
Y
# Paste it back (appears at bottom of Columns Sheet)
gP
# Then use J/K to move it into position
Reorder Columns
In the Columns Sheet, moving a row up/down moves the corresponding column left/right in the source sheet.
J # slide current row down (moves column right in source)
K # slide current row up (moves column left in source)
gJ # move row to bottom (column to far right)
gK # move row to top (column to far left)
Practical Use Cases
Retype All Numeric Columns at Once
Shift+C
|
# Enter: salary|years_experience|department_id
g#
q
# Verify: sort by salary now works numerically
Set Aggregators Before a Pivot
Shift+C
# Select salary row → s
g+ mean
# Select headcount rows → s
g+ count
q
# Move to 'department' → !
Shift+W
# Pivot shows mean salary and count per department
Hide Internal/Metadata Columns
Shift+C
|
# Enter: created_at|updated_at|internal_ref
g-
q
# Clean view with only business columns
Quick Reference
| Key | Action |
|---|---|
Shift+C | Open Columns Sheet |
e | Edit current cell |
Enter | Jump to column in source sheet |
q | Return to source sheet |
s | Select current row |
gs | Select all rows |
| | Regex select rows by column name |
g! | Toggle key for selected columns |
gz! | Remove key for selected columns |
g~ | Set type str for selected |
g# | Set type int for selected |
g% | Set type float for selected |
g$ | Set type currency for selected |
g@ | Set type date for selected |
gz# | Set type len for selected |
g+ <agg> | Set aggregator for selected |
g- | Hide selected columns |
d | Delete selected columns |
Y | Yank current column row |
gY | Yank selected column rows |
gP | Paste yanked columns |
J | Move row down (column right in source) |
K | Move row up (column left in source) |
gK | Move to top (far left in source) |
gJ | Move to bottom (far right in source) |
What's Next
- Aggregators — detailed aggregator reference
- Frequency Tables — analyze by column groups