pandas.core.groupby.GroupBy.head

Return first n rows of each group.

Essentially equivalent to .apply(lambda x: x.head(n)), except ignores as_index flag.

return

Series or DataFrame

Warning

This feature is currently unsupported by Intel Scalable Dataframe Compiler