import csv


def load_data(fn):
    """
    Reads the csv with image location and steering angle 
    """
    images = []
    steering_angles = []
    offset = 0.275 # offset for right and left 
    with open(fn) as f:
        reader = csv.reader(f)
        next(reader, None)
        for center_img, left_img, right_img, angle, _, _, _ in reader:
            angle = float(angle)
            images.append([center_img.strip(), left_img.strip(), right_img.strip()])
            steering_angles.append([angle, angle+offset, angle-offset])
    return images, steering_angles