head_pct

The head_pct method returns a table with a specific percentage of rows from the beginning of the source table.

Caution

Attempting to use head_pct on a blink table will raise an error.

Syntax

Parameters

ParameterTypeDescription
pctfloat

The percentage of rows to return. This value must be given as a floating-point number between 0 (0%) to 1 (100%).

Returns

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

Examples

The following example filters the table to the first 40% and 33.3333333% of rows.