The plotly number formatting is based on D3’s number formatting support. You can see the options at https://github.com/d3/d3-format. I believe the default behavior (where the SI suffix is displayed) is 's'.
I know, what I’m looking for is to use that not only where it’s enabled by plotly (in ‘tickformat’ property or axes), but in other parts of my python code (for example, to create the hover text, or to format any string out of plotly).
Your link is great, looks like d3-format is modeled after Python 3’s format specification mini-language. But there’s only this thing that is missing, exactly what I’d like to have
To give an exact example, in JS with D3-format this would work:
d3.format(".2s")(42e6); would produce '42M’
In Python , 's' is reserved for strings, so I haven’t found the way to do it.