def predict_decision_tree_frame(input_data, dt_frame):
    """
    Generate predictions for a single example from a decision tree.

    Args:
        input_data: 1D array of input data
        dt_frame: Decision tree in table format

    Returns:
        float: predicted value for input_data from tree.
    """
    index = 0
    not_leaf = True
    value = -9999.0
    while not_leaf:
        value = dt_frame.loc[index, "value"]
        if dt_frame.loc[index, "feature"] < 0:
            not_leaf = False
        else:
            exceeds = input_data[dt_frame.loc[index, "feature"]] > dt_frame.loc[index, "threshold"]
            if exceeds:
                index = dt_frame.loc[index, "children_right"]
            else:
                index = dt_frame.loc[index, "children_left"]
    return value