reading your data

Columns and colours

Every column in its own colour and lined up under the others, without a single character of the file changing.

A CSV file is text: values one after another, a comma (or a semicolon, a tab, a pipe) between them, a line per row. Trusty CSV shows that text as it is, and draws it so that you can read it as a table.

The first rows of a file of cities under the bar of column numbers: each column in its own colour and starting at the same place in every row, with the commas at the end of each column; the populations lined up on the right, and the latitudes and longitudes on their decimal points, the negative ones too

Rainbow colours

Each column has its own colour, the same in every row, so that you can follow a column down the file without counting commas. There are ten colours; an eleventh column takes the first one again. The delimiters are grey. View › Appearance › Rainbow Colours turns the colours off.

Aligned columns

With View › Appearance › Align Columns, each column is as wide as its widest value, and the next one starts at the same place in every row. The delimiter goes at the end of its column, so a short value is followed by blank space and then its comma.

That space is not in your file. The alignment is only drawn on the screen: the file keeps its exact text, and saving it writes what you opened, plus what you typed. Nothing is padded, trimmed or re-quoted.

The blank space behaves like the end of the value before it: a click in it puts the cursor right after that value, ready to type more.

Values in Chinese, Japanese or Korean, and emoji, take two columns of width, as they do in a terminal; scripts like Arabic or Devanagari are measured as they are drawn. Either way, the columns stay lined up.

A value in Arabic, Hebrew or another script written from right to left reads from right to left inside its own cell, and sits against the right edge of its column, where it starts. Which way a value reads is that of its first letter: Samsung سامسونج 24 reads from left to right, اسم 7 from right to left. The columns themselves keep their order, the first one on the left. The arrow keys move through such a value as it is drawn, ← always to the left; and when the value is too long for its column, its … is on its left, where it ends.

A column is never wider than 32 characters: a longer value folds into …. See Long values and line breaks.

A column you don’t need can be put out of sight, to bring the ones after it closer: View › Hide Column. It stays in the file. See Hiding columns.

Some columns line up by more than their left edge: numbers on their decimal point, email addresses on their @, times on their colon, dates group by group. See Numbers, dates and other values.

The header row

When the first row of a file holds the names of the columns, Trusty CSV reads it as a header. It detects this when it opens a file (see Delimiter and header row), and Table › First Row Is Header or the Header row switch of the status bar changes it.

The header row matters in a few ways:

  • The status bar names the cursor’s column by its header (city), and counts rows from the one after it (Row 11 of 1,978).
  • When you scroll down, the header’s names stay at the top of the window, under the column numbers, so you always know which column is which. Point at one to see it whole, if it is cut short. View › Appearance › Sticky Header Row turns that off. The first column can stay in sight in the same way when you scroll sideways: see Keeping the first column in sight.
  • Cleaning operations leave the header alone, unless you select cells in it and nothing else. See How data operations work.
  • Moving rows never moves it from the top. See Moving, copying and deleting rows.

Line numbers and rows

The numbers down the left are the file’s lines. Most of the time a line is a row, but a value can have line breaks inside it (between quotes), and then one row takes several lines. The status bar’s Row counts rows, header excluded, and Ctrl+G⌘G goes to either: see Moving around a file.

A click on a line number selects that row, a drag over them selects several, and Shift+Click⇧Click extends the selection to another row. A row with line breaks inside a value is selected whole. See Selecting columns and rows.