
groupby
Splits the data into groups based on the specified column. By using the groupby method, the elements in one column of the pandas dataframe’s rows can be grouped according to their duplicates. This can be used to apply statistical functions such as mean or sum.
agg
Multiple statistics, such as the mean, can be calculated at once.