max_repeat = 10 vc = df[col_name].value_counts() df = df[df[col_name].isin(vc[vc < max_repeat].index)]