GroupBy.
last
Compute last of group values.
Computed last of values within each group.
pandas.core.groupby.GroupBy.head
pandas.core.groupby.GroupBy.max