def grouping(df, col_name):
    """
    :param df:        Pandas DataFrame.
    :param col_name:  Name of column.
    :return DataFrame grouped by given column with count aggregation function
    """
    return df.groupby(col_name)['rating'].count()