def _extract_target(data, target_col):
    """Removes the target column from a data frame, returns the target
    col and a new data frame minus the target."""
    target = data[target_col]
    train_df = data.copy()
    del train_df[target_col]
    return target, train_df