# Reduce the DataFrame to Equal Count of Label Types min = df.label.value_counts().min() df = df.groupby('label').head(min).reset_index()