How to plot Horizontal Bar using values.index?

How can I achieve this in Plotly Express using Horizontal Bar?

The main problem is how to use counts in x-axis?

Hi @saurav
Have you tried looking at the bar graph documentation and building the plot from one of the examples there?

Yes, I have tried. I want to plot count on x-axis how to do that?

This should work:

fig =, x='state', y='count')

It doesn’t.

Here is my dataset:

I want to plot state on y-axis and corresponding values of states as count in x-axis