def multipliers(x):
    try:
        return float(x)
    except:
        pass
    try:
        a = x[-1]
        y = float(x[:-1])
        endings = {'G':9,'Meg':6,'k':3,'m':-3,'u':-6,'n':-9,'p':-12,'s':0}
        return y*(10**endings[a])
    except:
        raise ValueError("I don't know what {} means".format(x))
Convert values with si multipliers to numbers
dataset/ETHPy150Open Ttl/evolutionary-circuits/evolutionary/chromosomes/common.py/multipliers