def zero_float(string):
    """ Try to make a string into a floating point number
    and make it zero if it cannot be cast.  This function
    is useful because python will throw an error if you
    try to cast a string to a float and it cannot be."""
    try:
        return float(string)
    except:
        return 0