Skip to main content

DB_Table.take

takerange

Group: Selections
Aliases: first, head, keep, last, limit, sample, slice, tail, top

Documentation

Creates a new Table with the specified range of rows from the input Table.

For the purposes of the Index_Sub_Range.While predicate a single "element" of the table is represented by the Row type.

Arguments

  • range: The selection of rows from the table to return.

Examples

Take first 10 rows of the table.

      table.take (..First 10)

Take rows from the top of the table as long as their values sum to 10.

      table.take (While row-> row.to_vector.compute Statistic.Sum == 10)

Remarks

Supported Range Types

Database backends support all range types except While and Sample

In-memory tables support all range types.