Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23218

Formatting a number with a metric prefix (SI style)

$
0
0

I'm looking for an existing solution, for converting a number with a metric suffix (SI style) to float or int.

Additionally, my initial number with a metric suffix is a string.

Example:

I have:

a = "1u"b = "2m"c = "1.1u"

I want:

a = 0.000001b = 0.002c = 0.0000011

Viewing all articles
Browse latest Browse all 23218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>