# xarray.Dataset.head

`Dataset.``head`(indexers: Union[Mapping[Hashable, int], int] = None, **indexers_kwargs) → xarray.core.dataset.Dataset

  Returns a new dataset with the first n values of each array for the specified dimension(s).

  Parameters:

  - indexers (dict or int, default: 5) – A dict with keys matching dimensions and integer values n or a single integer n applied over all dimensions. One of indexers or indexers_kwargs must be provided.
  - **indexers_kwargs ({dim: n, ..}, optional) – The keyword arguments form of `indexers`. One of indexers or indexers_kwargs must be provided.

  See also

  `Dataset.tail()`, `Dataset.thin()`, `DataArray.head()`