All nodes/Data/DataFrame I/O

Convert

Universal payload converter: json ↔ dataframe ↔ csv. Choose the source and target type.

Convert
ValueSuccess
Error

Type in the graph: convert

Exec

An error branch can be enabled (expose_error_output) to handle failures on their own path.

Ports can be split into separate execution and data handles.

Try it

Minimal working workflow

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

Runs as pasted

When to use it

Moves a value between three forms: JSON (an object or a list of objects), CSV text and a DataFrame table. Most often the node is needed on the way out of the table world: a table cannot go into a prompt, an HTTP body or a Template — it has to become JSON or CSV first.

The other direction needs it less. The DF family and both writers (CSV, XLSX) already coerce a list of objects or CSV text into a table themselves. Add the converter explicitly when the parsing has to be spelled out — a ; delimiter, say, or a different header row.

How it works

There are four conversion pairs: JSON → DataFrame, DataFrame → JSON, DataFrame → CSV, CSV → DataFrame. There is no direct route between JSON and CSV: that takes two nodes in a row, through DataFrame. Graph validation says so before the run.

The fields follow the chosen pair: “CSV delimiter” appears when CSV is on either side, “CSV include header” when producing CSV, “CSV header row” when reading it, and “Max rows” only when producing JSON.

When “From” and “To” match, the value passes through unchanged.

Common mistakes

  • “From” does not match what actually arrives. The field is a declaration, not detection — the node does not sniff the format. A string with “From: JSON” produces an error along the lines of “Cannot convert str to dataframe”.
  • JSON → DataFrame from a list of non-objects. A list of objects (or a single object) is expected; a list of numbers or strings will not become a table.
  • CSV → DataFrame with the wrong delimiter. The default is ,; a ; export collapses into a single column, with no error raised.
  • DataFrame → JSON without “Max rows” in front of a model. The whole table goes into the prompt and is paid for in tokens. Cap the rows, or convert to CSV — it is noticeably more compact.

Inputs

PortWirePayloadNotes
ValuevalueExecute + Dataexecute_data

Outputs

PortWirePayloadNotes
SuccessoutputExecute + Dataexecute_data
Erroron_errorExecute + Dataexecute_data

shown when expose_error_output = true

Configuration

FieldTypeDefaultDescription
CSV delimiterdelimiterstring,

Fromfrom_kindstringjson

Options: json — JSON, csv — CSV (text), dataframe — DataFrame

CSV header rowheader_rowinteger0

Row index used as the header when reading CSV, 0 = first row (CSV → DataFrame).

shown when from_kind = csv

CSV include headerinclude_headerbooleantrue

Write the header row when producing CSV (DataFrame → CSV).

shown when to_kind = csv

Max rows (json output)max_rowsinteger0

Limit number of rows when converting DataFrame → JSON (0 = no limit).

shown when to_kind = json

Toto_kindstringdataframe

Options: json — JSON, csv — CSV (text), dataframe — DataFrame

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.