Visidata

A VisiData Cheat Sheet

Version

VisiData v2.6

Updated

2021-09-23

More info

Getting help

z + Ctrl-h

Display list of commands available on the current sheet

Getting out of trouble

U/R

Undo/Redo

Ctrl-c

Abort the current command

q

Quit the current VisiData "sheet"

Ctrl-q

Force-quit VisiData entirely

Input / output

o + filename

Open a file

Ctrl-s + filename

Save current sheet to filename

gY/gzY

Copy (column for) selected rows to clipboard

Metasheets

S

Sheets Sheet

gS

Sheets Graveyard

C

Columns Sheet

O

Global options sheet

zO

This-sheet options sheet

Move cursor ...

gj

to the last row

gk

to the first row

gh

to the leftmost column

gl

to the rightmost column

Ctrl-F

one page down (forward)

Ctrl-B

one page up (backward)

Moving via search

/ + 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

n

Move to next matching row

N

Move to previous matching row

Sort rows ...

[

in ascending order of current column

]

in descending order of current column

g[

in ascending order of key columns

g]

in descending order of key columns

Basic row selection

s

Select the current row

u

Unselect the current row

t

Toggle the current row between selected / unselected

gs

Select all rows

gu

Unselect all rows

gt

Toggle all rows between selected / unselected

Advanced row selection

| + regex

Select all rows where regex matches the current column

\ + regex

Unselect all rows where regex matches the current column

g| + regex

Select all rows where regex matches any column

g\ + regex

Unselect all rows where regex matches any column

,

Select all rows where the current column matches the current cell

g,

Select all rows where any column matches the current cell

z| + expr

Select all rows where expr evaluates to True

z\ + expr

Unselect all rows where expr evaluates to True

Shifting rows / columns

J

Move row up

K

Move row down

H

Move column left

L

Move column right

Setting column types

#

Integer

%

Float

$

Currency

@

Date

~

Text

Renaming columns

^

Rename current column

g^

Set names of all unnamed columns to the values in the current or selected row(s)

gz^

Set names of all visible columns to the values in the current or selected row(s)

Resizing columns

_

Adjust the width of current column to fit text in all visible rows

g_

Adjust the width of all columns to fit text in all visible rows

z_ + n

Set the current column's width to n characters

z-

Shrink the current column's width in half

-

Hide the current column by setting its width to 0

gv

Unhide all columns

Filtering

"

Create new sheet of selected rows

gz"

Create new sheet with "deep copy" of selected rows

Summarizing data

F

Create frequency table of current column

gF

Create frequency table of key columns

+ + aggr

Add aggregator to column

z+ + aggr

Calculate one-time aggregation of column

I

Create a "Describe Sheet," with summary stats for each column

Creating new columns

za

Create a blank column

i

Create an increment column (1,2,3…)

= + expr

Create a new column from a Python expr evaluated against each row

: + regex

Create new column(s) by splitting current column on regex

; + regex

Create new column(s) by extracting regex groups from current column

'

Create "frozen" copy of current column, with all cells evaluated

Reshaping data

W

Create pivot table sheet, with key column(s) as rows and current column as values

M

Create "melted" sheet, with key columns as non-melted values

T

Create a transposed sheet, where columns become rows and v.v.

Editing cells

e

Begin editing current cell

Enter

Finish editing

Ctrl-c

Cancel editing

Ctrl-a

Move to beginning of cell

Ctrl-e

Move to end of cell

Ctrl-k

Clear contents from cursor's position to end of line

Copying and pasting internally

y/gy

Copy current/selected row(s)

p

Paste previously copied rows

zy/zp

Copy/paste current cell

gzy/gzp

Copy/paste column for selected rows

zP/gzP

Paste from clipboard to current/selected cell(s)

Misc.

!

Make current column a "key" column

Ctrl-r

Reload sheet

Ctrl-^

Toggle between current and previous sheet

Space

Open long-name command prompt

Notes