tablebyrows
Generates a table from a list of rows, where each row is a list of cell values. Optionally, headers can be provided for the columns.
Example:
.var {headers}
- Name
- Age
- City
.tablebyrows {.headers}
- - John
- 25
- NY
- - Lisa
- 32
- LA
- - Mike
- 19
- CHIContent copied to clipboard
Result:
| Name | Age | City |
|------|-----|------|
| John | 25 | NY |
| Lisa | 32 | LA |
| Mike | 19 | CHI |Content copied to clipboard
Return
the generated Table node
Parameters
context
the current context, injected automatically
headers
- Optional
optional list of headers for the columns. If not provided, no headers are used.
rows
list of rows, where each row is an iterable of cell values. Rows can have varying lengths; missing cells will be filled with empty content. Each row is dynamically adapted to an iterable, hence rows produced by functions such as .repeat, or stored in variables, are accepted as well.