head

Get the first n rows/items

Returns the first n items from a List, Vector, or DataFrame. For DataFrames, it returns the top n rows.

Parameters

Returns

List | Vector A subset of the input containing the first n items.

Examples

head([1, 2, 3, 4, 5, 6], n = 3)
-- Returns = [1, 2, 3]

df |> head(n = 10)