# Determine if a sample is a good or bad part based on the conditions data['Label'] = np.where( (data['Station_2'] > 0.5) & (data['Station_4'] < -2.5) & (data['Station_7'] < 3), 'Bad', 'Good' )