tablefilter
.tablefilter column:{Int}
filter:{Lambda}
table:{MarkdownContent}
-> Node
Content copied to clipboard
Filters the rows of a table based on a boolean expression on a specific column.
Example:
.tablefilter {2} {@lambda x: .x::isgreater {20}}
| Name | Age | City |
|------|-----|------|
| John | 25 | NY |
| Lisa | 32 | LA |
| Mike | 19 | CHI |
Content copied to clipboard
Result:
| Name | Age | City |
|------|-----|------|
| John | 25 | NY |
| Lisa | 32 | LA |
Content copied to clipboard
Return
the filtered Table node
Parameters
column
index of the column (starting from 1)
filter
a lambda function that returns a boolean value. When true
, the rows is to be kept. The lambda accepts a single argument, which is the cell value of the column.