def ToSI(d):
    incPrefixes = ['k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
decPrefixes = ['m', '\xc2\xb5', 'n', 'p', 'f', 'a', 'z', 'y']
degree = int(math.floor(math.log10(math.fabs(d)) / 3))
prefix = ''
Convert float number to string with engineering notation (with SI prefixe) in Python