All docs
Table·
method
Table.head
takes the first n rows
Python
head(n: int = 5) -> Table
Returns Table — a new Table with the first n rows
Parameters#
| name | type | default | description |
|---|---|---|---|
n |
int |
5 |
how many leading rows to keep |
Example#
Python
t.head() # first 5 rows
t.head(10) # first 10
Notes#
head is a zero-copy slice, so it is cheap even on large tables. Every call returns a
new Table.
See also#
Guides: Tables & data flow
By LSD Team · Last updated Jul 17, 2026
Ask on Discord
View as Markdown