def count_pct(df, column="ClassId"):
    """Returns a `pandas.DataFrame` with count and frequencies stats for `column`."""
    class_count = df[column].value_counts().sort_index()
    class_count.index.set_names(column, inplace=True)
    class_count = class_count.to_frame()
    class_count.rename(columns={column: "num"}, inplace=True)
    return class_count.assign(freq=lambda df: df["num"] / df["num"].sum())