Generate Bar chart with plotly express on Python

ok thanks for the answer. You need to force the xaxis type to br category. Iโ€™m a bit surprised that itโ€™s not done automatically, but setting it yourself does the job:

fig = px.bar(df, x='CLASS', y='SCORE')
fig.update_xaxes(type='category')
1 Like