def counters(line):
    """
    Splits the line on a CSV and parses it into the key and summary counters.
    A counter is as follows: (count, total, square, minimum, maximum).
    """
    reader = csv.reader(StringIO(line), delimiter=',')
    row = reader.next()

    airport = row[4]

    try:
        delay = float(row[8])
    except __HOLE__:
        delay = 0.0

    return (airport, (1, delay, delay ** 2, delay, delay))
dataset/ETHPy150Open bbengfort/hadoop-fundamentals/describe/spark-app.py/counters