range for filters

Return only the selected rows.

Signature

> range (rows)

Parameters

  • rows: range of rows to return: Eg) 4..7 (=> from 4 to 7)

Input/output types:

inputoutput
list<any>list<any>

Examples

Get the last 2 items

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

Get the last 2 items

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

Get the next to last 2 items

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