polars fetch for lazyframe

Collects the lazyframe to the selected rows.

Signature

> polars fetch {flags} (rows)

Parameters

  • rows: number of rows to be fetched from lazyframe

Input/output types:

inputoutput
anyany

Examples

Fetch a rows from the dataframe

> [[a b]; [6 2] [4 2] [2 2]] | polars into-df | polars fetch 2
╭───┬───┬───╮
 # │ a │ b │
├───┼───┼───┤
 0 6 2
 1 4 2
╰───┴───┴───╯