gitmyhub

visidata

Python ★ 9.1k updated 21h ago

A terminal spreadsheet multitool for discovering and arranging data

A keyboard-driven terminal tool for exploring and editing spreadsheet data, open CSV, JSON, Excel, and more instantly in any terminal, then sort, filter, join, and transform rows without a GUI.

Pythonsetup: easycomplexity 2/5

VisiData is a terminal-based tool for exploring spreadsheet-style data. It runs entirely in the command line, so anyone with Python 3 installed on a remote server can use it over a plain SSH connection. There is no graphical interface to install or configure. You open a file and immediately see it laid out in rows and columns, browsable with keyboard shortcuts.

The tool opens CSV, TSV, JSON, Excel, and HDF5 files. Large files start showing their first rows right away rather than waiting for the entire file to load. From there you can sort columns, filter rows using regular expressions, edit cell contents, assign a data type (integer, float, string, or date) to a column, and add new computed columns using Python expressions. You can also join multiple sheets together using inner, outer, full, or difference joins, matching rows by whichever columns you mark as key columns.

VisiData organizes work into sheets. One sheet might be the file you opened. Another sheet might be a frequency table showing how many times each unique value appears in a column, complete with a simple histogram. There are meta-sheets for managing all open sheets, viewing columns, changing display options, and inspecting errors or background threads. Navigating between these uses the same keyboard-driven interface throughout.

Saving is straightforward: press Ctrl-S and choose a filename with a .csv or .tsv extension. Edits made to joined sheets flow back to the original source sheets automatically.

Installation is a single pip command. Optional Python packages add support for Excel files, HDF5 files, and Google Sheets. The tool is released under the GPLv3 license.

Where it fits