DataFrame → Signals
Shippingdf_to_signalsPlot every column against a chosen X column — emits one signal per remaining numeric column
Signature
Inputs
dfDataFramerequired— The table to expand. Every numeric column (except the chosen X) becomes a bundle channel.
Outputs
signalsSignalBundle— One channel per numeric column, sharing the resolved X / time axis.
Parameters
| Key | Type | Default | Notes |
|---|---|---|---|
x_column | string | 0 | Column used as the shared X axis (name or 0-based index). EXCLUDED from the output signals. Empty or -1 = use the row index. A single-numeric-column frame is always plotted against the row index. |
sample_rate | float | 1000.0Hz | Sampling rate used to synthesize the time axis when X is the row index (ignored when an X column is chosen). |
unit | string | Physical unit applied to channels whose source column carries no unit in its header. |
Description
DataFrame → Signals (df_to_signals) expands a table back into a plottable SignalBundle — the node form of "see the columns plotted against the first column". It is the inverse of df_from_signals and shares its heavy lifting with the file_import "Signal Bundle" output mode.
One column is chosen as the shared X / time axis via x_column (a name or 0-based index). That column is excluded from the outputs; every other numeric column becomes a bundle channel sampled at the X values. If x_column is empty or -1, X is the row index — a uniform ramp at sample_rate Hz — and every numeric column becomes a channel.
The resolver is forgiving: a selector that does not resolve to a real column simply falls back to the row index rather than erroring. There is also an fallback — if excluding the named X column would leave no numeric channel (i.e. the frame has only one numeric column), that lone column is emitted anyway, plotted against the row index. So a single-column table always yields a one-channel bundle.
Columns carrying a unit in their header keep it; columns with no unit adopt the Fallback Unit param. The node is stateless. A non-DataFrame input is a type mismatch.
Mathematics
Examples
Three columns, X = column 0
A frame with columns t = [0, 1, 2], a = [1, 2, 3], b = [10, 20, 30] and x_column = 0 yields a 2-channel bundle: a and b, each sampled at . Column t is consumed as the axis, not emitted.
Single column falls back to the index axis
A frame with one numeric column v = [5, 6, 7] and x_column = 0 cannot exclude v and still have a channel, so the fallback emits v as a single channel over the row index at sample_rate — no "no numeric columns" error.
Applications
- Plotting an imported CSV/TSV table: pick the time column as X and watch every measurement column as a trace.
- Round-tripping the columnar toolkit back to the signal domain after select / filter / sort / slice edits.
- Turning a computed parameter frame (e.g. a regression sweep) into channels for a strip-chart or FFT.
- Rendering an index-only numeric grid as uniformly sampled signals by leaving x_column empty and setting a sample rate.
Neat
An unresolvable X selector degrades gracefully to the row index instead of failing, so a typo in a column name still produces a usable plot.
The n = 1 fallback guarantees a single-numeric-column frame is never dropped: it is re-plotted against the row index even when the user named it as the X axis.
It reuses io::dataframe_to_bundle — the very same conversion file_import uses for its Signal Bundle output — so canvas and import paths render identical bundles.
Known issues
Non-numeric (text/datetime-as-string) columns are silently skipped as channels; only numeric columns become signals.
When X is the row index the time axis is a synthetic uniform ramp at sample_rate — it does not reflect any real timestamp column unless you select one as X.