Skip to content

Sorting & Filtering

In Table view, you can sort the rows by one column and filter them by the values in a column. Both work on the whole file, not only the rows on screen.

Click a column header to sort by that column. Each click moves to the next step: ascending, then descending, then the file’s own order again. You can also right-click the header, or select its ⋮ button, and choose Sort ascending, Sort descending, or Clear sort.

The sorted column shows an arrow in its header, and the table state bar shows a sort chip. To remove the sort, select the × on the chip.

You can sort by one column at a time. Sorting by another column replaces the current sort.

How Vaste orders the values depends on the column’s type, shown by the glyph in its header:

  • Number columns (123 and .0) sort by value. Cells that are empty or are not numbers go last, in both directions.
  • All other columns sort by character code. Uppercase letters come before lowercase letters, and the order does not follow the rules of any language: Zebra comes before apple. Empty cells come first in ascending order.

Rows with the same value can appear in any order.

Vaste sorts the whole file at once, without a progress bar and without a way to cancel. On a large file the sort can take a while. A file with more than 10,000,000 data rows cannot be sorted: a notification reports the limit, the header shows no arrow and the rows keep their order.

A sort and a filter combine: the rows that pass the filter appear in sorted order.

Open the filter bar in one of these ways:

  • Select Filter in the Table view toolbar.
  • Press Ctrl + Shift + F, or select More actions (…) → Column filters.
  • Right-click a column header and select Filter this column, or right-click a row and select Filter followed by the column name. Vaste opens the filter bar and puts the cursor in that column’s box.

The filter bar has one box per column, above the column headers. Type a value in a column’s box. Vaste filters the rows when you stop typing, and shows Filtering… N% while it works. The table state bar then shows how many rows match, for example 1,204 of 250,000 rows.

The menu next to each box sets how the value is matched:

Operator Matches cells that
~ Contain the value. This is the default.
= Are exactly the value
.* Match a regular expression
> Are numbers greater than the value. Number columns only.
< Are numbers less than the value. Number columns only.

Matching always ignores case, for every operator. Spaces at the start and end of what you type are removed, but cells are compared as they are, so = with NYC does not match a cell that holds NYC.

A regular expression uses the syntax of the Rust regex crate and matches anywhere in the cell. Unlike in search, Unicode support is on: \w, \d, and \b cover letters and digits in every script, and ignoring case covers accented letters too. To match the whole cell, add ^ and $, as in ^(NY|LA)$. If the expression is not valid, Vaste shows no message, and the table shows no data until you correct or clear the filter.

> and < compare numbers. A cell matches only when it holds a plain number, so cells such as 1,200, $40, or 12 ms never match. If you type text instead of a number, Vaste compares with 0.

Filters on several columns combine: a row must match all of them. There is no way to show rows that match one filter or another.

  • To clear one filter, empty its box, select the × in its box, or select the × on its chip in the table state bar.
  • To clear every filter, select Clear filters in the table state bar.
  • Reset view clears the filters and the sort, and also restores hidden, moved, and renamed columns.

Vaste does not keep filters and sorts. These actions clear them:

  • Switching to another view.
  • Reloading the file, by hand or with Auto reload.
  • Reopening the file with another encoding.
  • Changing the CSV dialect or the header row.
  • Closing the file.
  • Column statistics: count, distinct values, minimum, maximum, and average for a column
  • Data quality: show only rows with the wrong number of fields, or duplicate rows
  • Search modes: regular expression syntax