def vote(df, columns_name, value): label_data = df.loc[df[columns_name] == value, 'label'].values return Counter(label_data).most_common()[0][0]