def _pop_columns(data, cols, ignored):
    """Remove columns not in cols"""
    cols = set(cols)
    for col in data.columns:
        if col not in cols:
            ignored.append([col, data[col].tolist()])
    return data[[col for col in cols if col in data.columns]]
