dask_expr._collection.Index.head

dask_expr._collection.Index.head

Index.head(n: int = 5, npartitions=1, compute: bool = True)

First n rows of the dataset

Parameters
nint, optional

The number of rows to return. Default is 5.

npartitionsint, optional

Elements are only taken from the first npartitions, with a default of 1. If there are fewer than n rows in the first npartitions a warning will be raised and any found rows returned. Pass -1 to use all partitions.

computebool, optional

Whether to compute the result, default is True.