def get_float(item, index): """ Given an record list & an index, it returns a float or 0.0. """ value = 0.0 try: value = float(smart_str(item[index].strip())) except: pass return value