def select_candidates(candidate_data, number):
    """
    Select top candidates from candidate dataframe, based off of lowest bandgap.
    """
    candidate_data = candidate_data.sort_values('bandgap_pred', ascending=True)
    top_candidates = candidate_data.head(number)
    return top_candidates