turicreate.SArray.head

SArray.head(n=10)

Returns an SArray which contains the first n rows of this SArray.

Parameters:
n : int

The number of rows to fetch.

Returns:
out : SArray

A new SArray which contains the first n rows of the current SArray.

Examples

>>> tc.SArray(range(10)).head(5)
dtype: int
Rows: 5
[0, 1, 2, 3, 4]