def get_dataset_up_to_peak(dataset, peak_temp):
    """Get only the data points before the peak temperature."""
    dataset_up_to_peak = []

    for row in dataset:
        if float(row[4]) < peak_temp:
            dataset_up_to_peak.append(row)

    return dataset_up_to_peak