Escribal
Back to Docs

CSV / TSV

Columns

This group reshapes the columns of a loaded table — keep, remove, rename or reorder columns; add a fixed-value or calculated column; split one column into several or merge several into one; and pivot or unpivot the whole table. Unlike the saving group, these instructions change the loaded document in place: after they run, the table you keep working with is the reshaped one.

Prerequisite: a CSV/TSV document must already be loaded — created with Create CSV/TSV file or opened with one of the Reading instructions. These instructions read that loaded document and rewrite it.

These concepts recur across the instructions in this group; they are explained here once.

  • Document: the Document key points to the loaded CSV/TSV these instructions reshape. If you leave it empty, the current document is used (the one instructions work on by default). If the key isn’t loaded, the instruction does nothing.

  • These change the loaded table in place. There is no output file — the reshaped table replaces the one in memory, and later instructions see the new columns. To write it to disk afterward, use a Saving & exporting instruction.

  • Columns are found by name, ignoring upper/lower case. Where an instruction takes several column names, type them separated by commas (e.g. First name, Last name, City). Spaces around each name are trimmed, and empty entries are ignored. A name that doesn’t match any column is simply skipped.

  • Order matters where you list columns. In Select Columns and Reorder Columns, the order you type the names is the order of the output columns.

  • Works with tables loaded with headers. These instructions read the column names from the table’s header row. A table loaded without headers has no column names to match, so most of these instructions have nothing to act on.

  • Save a result (saveRowCountKey): every instruction can save the number of rows the table has after the reshape, under the name you type, for later instructions to use with @name. Leave it empty and nothing is saved.

  • Dynamic values @name: the text fields (column names, values, separators, and so on) accept a saved value — type @ followed by its name and the engine substitutes it at run time.

  • “From variable” fields: only Add Calculated Column has a number field (Decimal places), with a companion …key field. A number field can’t take @name, so this is its equivalent:

    • If you leave the …key field empty, the number typed in the normal field is used.
    • If you fill it in with the name of a saved value, the engine ignores the normal field and reads the number from that variable.

    This is mainly for chaining instructions. If you only work with fixed values, you can ignore it.

Add Calculated Column .csv

Adds a new column whose value is computed from two existing columns — either joined together as text, or combined with a math operation.

When to use it: to derive a value per row — e.g. a full name from first and last, or a total from price and quantity.

Parameter Meaning Default Required
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
New column name Name of the column to add (accepts @name) (empty) Yes
Operation concat, add, subtract, multiply or divide concat No
Column A The first source column (accepts @name) (empty) No
Column B The second source column (accepts @name) (empty) No
Separator Text placed between the two values — used only with concat (accepts @name) (space) No
Decimal places For math formulas, how many decimals to round the result to 2 No
Decimal places (from variable) (from variable) reads the decimal places from a saved value instead of the field above (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if New column name is empty (or the document isn’t loaded) nothing happens. The new column is added at the end of the table. With a math formula, both cell values must be valid numbers or the row falls back to joining them as text; divide also falls back when the divisor is 0. Numeric results are rounded to Decimal places. With concat (or an unrecognized formula) the two values are joined with Separator between them.


Add Fixed Value Column .csv

Adds a new column that holds the same value in every row.

When to use it: to tag every row with a constant — e.g. a source name, a batch number, or a status.

Parameter Meaning Default Required
New column name Name of the column to add (accepts @name) (empty) Yes
Fixed value The value written into every row (accepts @name) (empty) No
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if New column name is empty (or the document isn’t loaded) nothing happens. The new column is added at the end of the table; Fixed value may be left empty to add a blank column.


Merge Columns .csv

Joins two or more columns into a single new column, with a separator between the values.

When to use it: to combine parts into one field — e.g. street, city and postcode into a full address.

Parameter Meaning Default Required
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Column names Comma-separated source columns to merge, in order (accepts @name) (empty) No
New column name Name of the merged column (accepts @name) (empty) Yes
Separator Text placed between the merged values (accepts @name) (space) No
Remove original columns If yes, delete the source columns after merging yes No
Remove original columns (from variable) Reads the yes/no value from a saved value (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if New column name is empty (or the document isn’t loaded) nothing happens. The merged column takes the position of the first source column. Source names that aren’t found are skipped. With Remove original columns on, the source columns are deleted; with it off, they are kept alongside the new one.


Pivot Table .csv

Reshapes the whole table into a summary grid: the unique values of one column become new column headers, another column supplies the row identifiers, and a third fills the cells (aggregated).

When to use it: to turn a long list into a cross-tab — e.g. sales rows into a “product × month” grid.

Parameter Meaning Default Required
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Row key column The column whose values become the row identifiers (accepts @name) (empty) Yes
Pivot column The column whose unique values become new column headers (accepts @name) (empty) Yes
Value column The column whose values fill the grid cells (accepts @name) (empty) Yes
Aggregation How to combine cells: sum, count or first (accepts @name) sum No
Save row count key Saves the row count after the change (empty) No

Important behavior: if Row key column, Pivot column or Value column is empty (or the document isn’t loaded) nothing happens. The result replaces the whole table: its first column is the row key, followed by one column per distinct pivot value (sorted alphabetically). Cells combine the matching values — sum adds the numeric ones (non-numbers are ignored; an empty cell means no data), count counts the matching rows, first keeps the first value seen.


Remove Columns .csv

Deletes one or more columns by name.

When to use it: to drop columns you don’t need — e.g. internal IDs or notes before exporting.

Parameter Meaning Default Required
Column names Comma-separated columns to remove (accepts @name) (empty) No
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if the document isn’t loaded nothing happens. Names that aren’t found are ignored; if Column names is empty, no columns are removed (the table is left as-is). All remaining columns keep their original order.


Rename Columns .csv

Changes column headers, matching a list of old names to a list of new names.

When to use it: to clean up or standardize headers — e.g. rename col1, col2 to Name, Email.

Parameter Meaning Default Required
Old names Comma-separated original column names (accepts @name) (empty) No
New names Comma-separated replacement names, in the same order (accepts @name) (empty) No
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if the document isn’t loaded nothing happens. Old names and New names are paired by position, so keep them in the same order; if the lists differ in length, only the pairs up to the shorter list are used. Old names that aren’t found are ignored, and columns not listed keep their names. Only the headers change — the rows and their order stay the same.


Reorder Columns .csv

Changes the left-to-right order of the columns.

When to use it: to put the most important columns first, or to match the order another tool expects.

Parameter Meaning Default Required
New order Comma-separated column names in the desired order (accepts @name) (empty) No
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if the document isn’t loaded nothing happens. The columns you list come first in that order; any columns you don’t list are kept and appended after them in their original order. Names that aren’t found are skipped. You don’t have to list every column — only those you want moved to the front.


Select Columns .csv

Keeps only the columns you name and discards the rest.

When to use it: to reduce a wide table to just the columns that matter — the inverse of Remove Columns.

Parameter Meaning Default Required
Column names Comma-separated columns to keep, in the desired order (accepts @name) (empty) No
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if Column names is empty (or the document isn’t loaded) nothing happens. Only the named columns are kept, in the order you list them; every other column is dropped. Names that aren’t found are skipped.


Split Column .csv

Splits one column into several by cutting each cell at a separator character.

When to use it: to break a combined field apart — e.g. First Last into two columns, or a City, Country field into two.

Parameter Meaning Default Required
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Column name The column to split (accepts @name) (empty) No
Split separator The text to cut each cell at (accepts @name) (space) No
New column names Comma-separated names for the resulting columns (accepts @name) (empty) No
Remove original column If yes, delete the original column after splitting yes No
Remove original column (from variable) Reads the yes/no value from a saved value (empty) No
Save row count key Saves the row count after the change (empty) No

Important behavior: if New column names is empty (or the document isn’t loaded) nothing happens. The new columns take the position of the original column (or the end of the table if it isn’t found). Each cell is cut at Split separator: if a cell produces more pieces than there are new columns the extras are dropped, and if it produces fewer the missing columns are left blank. With Remove original column on, the source column is deleted; with it off, it is kept.


Unpivot Table .csv

Reshapes a wide table into a tall one: several value columns are folded into two columns — one holding the former column name, the other its value — repeating the identifier columns on each new row.

When to use it: the reverse of Pivot Table — e.g. turn Jan, Feb, Mar columns into Month and Amount rows, keeping the row identifier alongside each.

Parameter Meaning Default Required
Document key The loaded CSV/TSV to reshape. Empty = current document (accepts @name) (empty) No
Id columns Comma-separated columns to keep as row identifiers (accepts @name) (empty) No
Value columns Comma-separated columns to fold into rows (accepts @name) (empty) No
Key column name Name of the new column holding the former column names (accepts @name) Attribute No
Value column name Name of the new column holding the values (accepts @name) Value No
Save row count key Saves the row count after the change (empty) No

Important behavior: if Value columns is empty (or the document isn’t loaded) nothing happens. The result replaces the whole table: its columns are the Id columns followed by Key column name and Value column name. Each source row becomes one new row per value column, so the table grows taller. Id or value names that aren’t found are skipped.


This documentation is the help of the application, and it comes underCreative Commons Attribution 4.0.