DATASET ADD COLUMN BY COLUMN REGEXP¶
Adds two new columns to a dataset by extracting numeric (or pattern-matched) values from existing column headers using a pair of regular expressions. Use this worker when column names encode metadata (e.g. “150_mm”, “30_deg”) that you need to promote into first-class dataset columns for downstream analysis.
When to use¶
Classification: process.
Tagged: add_column, column_extraction, dataset_transform, header_parsing, regex, regexp.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Choose Dataset | dataset | dataset | — | Input dataset whose column headers will be parsed by the two regular expressions; accepts any tabular dataset object. | |
| Regular Expression for X | regexp_1 | scalar | — | Regular expression (quoted string) applied to column headers to extract values for the first new column (X); e.g. (d+)_mm captures all digits preceding _mm. | |
| Regular Expression for Y | regexp_2 | scalar | — | Regular expression (quoted string) applied to column headers to extract values for the second new column (Y); e.g. (d+)_deg captures all digits preceding _deg. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| dataset_add_column_by_regexp_output_1 | dataset_add_column_by_regexp_output_1 | dataset | Augmented dataset identical to the input but with two additional columns populated from the regex-matched values extracted from the original column headers. |
Disciplines¶
- data.dataset.transform
Runnable example¶
A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=dataset_add_column_by_column_regexp
Auto-generated from transformation schema. Worker id: dataset_add_column_by_column_regexp. Schema hash: f66a9161bc2e. Hand-curated docs in workerexamples/ override this page when present.