import csv


def load_log_file(dataPath, sample_rate=1):
    """
    Returns the lines from a driving log with base directory `dataPath`.
    """
    lines = []
    with open(dataPath + '/driving_log.csv') as csvfile:
        reader = csv.reader(csvfile)
        for indx, line in enumerate(reader):
            if indx % sample_rate== 0:
                lines.append(line) # line content: center   left    right   steering    throttle    brake   speed
            else:
                pass

    lines = lines[1:]
    return lines