def prep_totals(head_res, baseline_res):
    """
    Each argument should be a dataframe with  'timing' and 'name' columns
    where name is the name of the vbench.

    returns a 'totals' dataframe, suitable as input for print_report.
    """
    head_res, baseline_res = head_res.align(baseline_res)
    ratio = head_res['timing'] / baseline_res['timing']
    totals = DataFrame({HEAD_COL:head_res['timing'],
                        BASE_COL:baseline_res['timing'],
                        'ratio':ratio,
                        'name':baseline_res.name},
                        columns=[HEAD_COL, BASE_COL, "ratio", "name"])
    totals = totals.ix[args.min_duration > totals[HEAD_COL]]
    # ignore below threshold
    totals = totals.dropna(
    ).sort("ratio").set_index('name')  # sort in ascending order
    return totals
dataset/ETHPy150Open pydata/pandas/vb_suite/test_perf.py/prep_totals/swapped operands of `>`