I'm guessing you're using express. I used the diamonds dataset from the R library ggplot2 for the plot.
It can be done in Python when you create the graph. Since I don't have your data, I've made a few examples and what changes and how it changes when I use it.
Plotly formatting uses D3. You can read more about that here.
import pandas as pd
pd.options.plotting.backend = "plotly"
diam_py = r.diamonds
df = pd.DataFrame(diam_py)
fig = df.plot.bar(x = "color",
y = "price",
color = "cut",
template = "simple_white",
barmode = "group")
fig.show()
fig.update_yaxes(tickformat=",.0f").show() # use thousand comma; round to whole number
fig.update_yaxes(tickformat="none").show() # show number as is
fig.update_yaxes(tickformat=",.0s").show() # SI prefix with 0 significant digits
fig.update_yaxes(tickformat="#x").show() # prefixed lowercase hexidecimal
# more details at https://github.com/d3/d3-format
The figures are in the order in which they appear in the code.
Default y-axis formatting

Use commas at the thousands & round to the whole number

Remove all formatting—show as is in the data

SI prefix with no significant digits (M for millions here)

Hexidecimal formatting...in case binary is of interest
