range for filters

Return only the selected rows.

Signature

> range {flags} (rows)

Parameters

  • rows: Range of rows to return.

Input/output types:

inputoutput
list<any>list<any>

Examples

Get the last 2 items

> [0,1,2,3,4,5] | range 4..5
╭───┬───╮
 0 4
 1 5
╰───┴───╯

Get the last 2 items

> [0,1,2,3,4,5] | range (-2)..
╭───┬───╮
 0 4
 1 5
╰───┴───╯

Get the next to last 2 items

> [0,1,2,3,4,5] | range (-3)..-2
╭───┬───╮
 0 3
 1 4
╰───┴───╯