def ratio(value, decimal_places=0, failure_string='N/A'):
    try:
        f = float(value)
    except ValueError:
        return failure_string
    return _saferound(f, decimal_places) + ':1'
Converts a floating point value a X:1 ratio.
dataset/ETHPy150Open eyeseast/python-tablefu/table_fu/formatting.py/ratio