table_transform
Reshape tabular data by transposing, selecting columns, renaming, sorting, deduping, or filtering rows. Convert between Markdown, CSV, TSV, JSON, and HTML.
Instructions
Reshape a table: transpose, pick or rename columns, sort, dedupe, filter.
Prefer this over editing rows by hand when the change is mechanical, because the whole table is processed at once and row order is preserved.
Args: text: The whole table as text. operation: What to do. transpose | select_columns | rename_columns | sort | dedupe | drop_empty_rows | filter. from_format: How to read the input. markdown, csv, tsv, json or html. to_format: How to write the result. markdown, csv, tsv, json or html. columns: For select_columns: the column names to keep, in output order. A 1-based column number is also accepted, e.g. "2". renames: For rename_columns: a mapping of old name to new name. sort_by: For sort: the column to sort on. descending: For sort: set true for descending order. numeric: For sort: set true to sort numerically instead of as text. column: For filter: the column to test. operator: For filter: == | != | > | >= | < | <= | contains | startswith | endswith | empty | not_empty. value: For filter: the value to compare against. aligns: Markdown output only. Per-column alignment or a single value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| value | No | ||
| aligns | No | ||
| column | No | ||
| columns | No | ||
| numeric | No | ||
| renames | No | ||
| sort_by | No | ||
| operator | No | ||
| operation | Yes | ||
| to_format | No | markdown | |
| descending | No | ||
| from_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |