#cli #pager #tass

app tass

A pager for tabular data

8 releases (breaking)

0.8.0 Dec 15, 2023
0.7.0 Dec 5, 2023
0.6.0 Dec 4, 2023
0.5.0 Jan 24, 2022
0.1.0 Nov 28, 2020

#1047 in Command line utilities

Download history 6/week @ 2023-11-12 1/week @ 2023-11-19 12/week @ 2023-11-26 66/week @ 2023-12-03 47/week @ 2023-12-10 5/week @ 2023-12-17 17/week @ 2023-12-24 10/week @ 2023-12-31 1/week @ 2024-01-07 1/week @ 2024-01-14 5/week @ 2024-01-21 16/week @ 2024-01-28 1/week @ 2024-02-04 32/week @ 2024-02-11 145/week @ 2024-02-18

194 downloads per month

Unlicense

3MB
1.5K SLoC

Tass

A pager for tabular data

It's like less, but for CSV and parquet files! It looks like this:

The fourth and fifth columns only contains a small number of unique values, so tass colour-codes them automatically. The columns to the right of those are numerical, so tass right-aligns them and shows negative values in red.

This demo shows data being piped into (an older version of) tass. You can also open files which are still being appeanded to; new rows appear as the file grows.

Installing

If you already have rust, you can install tass like this:

$ cargo install tass

Usage

You can pass a filename, or pipe data to stdin:

$ tass mydata.csv
$ cat mydata.csv | tass
Key Action
Up/j, PageUp Move up one row, page
Down/k,PageDown Move down one row, page
Left/h Move left one column
Right/l Move right one column
Home, End Move to start/end of file
number g Move to line $number
f Move to end and auto-scroll as new rows come in
/, ? Search, reverse-search for string
n, N Jump to next, previous match
q/Esc Quit

Comparison to other tools

Tool Functionality Filetypes Streaming File size
tass ⭐ Viewing data, basic searching and filtering CSV, parquet yes Large (bigger than memory is fine)
csvlens ⭐ Appears to be very similar to tass CSV, TSV yes ?
VisiData ⭐⭐ Summary stats, plots, etc. CSV, JSON, parquet, ... yes Medium (up to perhaps 50% of memory)
Excel/Calc/Numbers/Google Sheets ⭐⭐⭐ It's a spreadsheet! CSV, xls, ods, ... no Small (1M row limit)

My advice is to use the most full-featured tool you can get away with. However, if you are cursed with multi-gigabyte CSV files, then your options are limited.

Tips & tricks

Here are some more tips for working with large CSV files:

  • If you want to see summary statistics but don't care about the underlying data itself, you can still use VisiData/Excel/etc.: just downsample it first. This will reduce the precision of your stats and plots, but not the overall shape (probably). xsv has a subcommand that can do this for you.
  • If you want exact answers to complex questions, consider dumping your CSV into a sqlite database and working with that instead.
  • For ad-hoc computations on CSV files, take a look at frawk - it's really nice.

Dependencies

~30–44MB
~755K SLoC