def load(db, slct, label, features):
    """load returns the training features and the labels. The features is
a dict from field names to data columns, and the label is a dict from
the label field name to the label data column.

    Args:
        db: returned from MySQLdb.connect()
        slct (str): SQL SELECT statement
        label (str): the label field name as a string.
        features (list of str or None): feature field names.

    Returns:
        (features, label): maps from feature/label field names to columns.

    """
    cursor = db.cursor()
    cursor.execute(slct)
    f = [i[0] for i in cursor.description]  # get field names.
    c = list(zip(*cursor.fetchall()))  # transpose rows into columns.
    d = dict(zip(f, c))  # dict from field names to columns.
    l = d.pop(label)
    if features != None:
        d = dict((k, d[k]) for k in features)
    return d, l