Shape · Summarize and reshape

Split to Columns

Breaks one text column into several columns at a delimiter, such as 'London, UK' into city and country.

Also known as: Text to columns

How it works

Pick the Column to split and the Delimiter, , by default. Max columns caps how many pieces become columns; leave it blank and the node scans the data for the longest value and makes that many. Output names is a comma-separated list; a blank position falls back to <column>_n. When Max columns is blank, a name that clashes with an existing column gets a numeric suffix; with a fixed count, pick names the input does not already have. A value with fewer pieces leaves the remaining columns null. Drop original column and Trim whitespace around tokens are both on by default. A set Max columns lets the node run on the drone; the auto count needs the desktop.

Inputs and outputs

Inputs

  • data — Table

Outputs

  • data — Table

Settings

The Attributes panel of Split to Columns, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  column
  delimiter
  maxSplits?
  outputNames?
  dropOriginal
  trimWhitespace
}

Example

A location column holds London, UK. Split on , with Max columns 2 and Output names city, country.

citycountry
LondonUK
ParisNULL