def TestMaxValue(df, col, val):
    """
    Test a column from a dataframe to validate that the max value == val.
    """
    print(("Validating max of %s == %.2f" % (col, val)))
    ordered = df[col].sort_values(ascending=False)
    max_val = ordered.iloc[0]
    if max_val != val:
        print(("Maximum value %.2f != %.2f" % (max_val, val)))
        return False
    return True