def float_to_int(afloat):
    """ Converts integer floats (e.g. 1.0000) to integers """
    elements = str(afloat).split('.')
    if len(elements) == 1:
        return afloat
    elif len(elements) == 2:
        if float(elements[1]) == 0:
            return int(afloat)
        else:
            return afloat
    else:
        pass
