All nodes/Data/DataFrame Ops

DF Sort

SQL ORDER BY: sort by one or more columns.

DF Sort▶
TableTable
Error

Type in the graph: df_sort

Exec

An error output can be enabled to handle failures on their own path.

Ports can be split into separate execution and data handles.

Try it

Minimal working scenario

Entry
DF Sort▶
Exit▶
  • Execute + Data
Press “Copy nodes”, open the editor and hit Ctrl+V on the canvas.

Runs as pasted

When to use it

Orders the rows of a table — the SQL ORDER BY of the family. Order is not only for reports: it decides which of several identical rows counts as the first one, which is why this node goes before df_drop_duplicates when you want to keep the most recent record, and before writing a file.

How it works

“Sort keys” is a list: each row names a column and its own direction flag. The order of the rows sets the priority — the first key sorts, the second breaks ties inside the first, and so on. The direction is chosen per key; there is no single toggle for the whole node.

The sort is stable: rows whose keys are all equal keep the relative order they arrived in. After sorting, row numbering is rewritten from zero, which matters for a later side-by-side df_concat.

Common mistakes

  • No keys at all. The list is required; a graph with an empty one fails validation.
  • Expecting the sort to trim the table too. There is no “take the first N” node in the family: limit the row count with df_query or with the “Row limit” field while reading the file (df_read_csv).
  • A column with mixed values. If one column holds both numbers and text, the comparison fails and takes the node with it — normalise the values first (df_update).
  • Sorting “by date” where the date is text. Such a column sorts as a string, so 2026-08-15 and 2026-8-9 end up in an order you did not expect. Zero-padded formats sort correctly.

Inputs

PortWirePayloadNotes
TabledfExecute + Dataexecute_datadataframe

Outputs

PortWirePayloadNotes
TableoutputExecute + Dataexecute_datadataframe
Erroron_errorExecute + Dataexecute_data—

shown when expose_error_output = true

Configuration

FieldTypeDefaultDescription
Sort keysbyarray—

Order of priority — first key sorts first.

Shared fields

Every node has these three — the platform adds them, not the node author.

  • expose_error_output — When enabled, show an execution output to connect nodes that run if this step fails.
  • split_ports_in — Show separate execution and data input handles instead of one combined port.
  • split_ports_out — Show separate execution and data output handles instead of one combined port.