head

The head method returns a table with a specific number of rows from the beginning of the source table.

Syntax

Parameters

ParameterTypeDescription
num_rowsint

The number of rows to return.

Returns

A new table with a specific number of rows from the beginning of the source table.

Examples

The following example filters the table to the first two rows.

The following example uses head on a blink table. Note that head treats the blink table like an append-only table, saving the first five rows that were added to the table, and ignoring all following updates.

The above source and result tables