Plotting bar graph with the range in the x- axis -Python
<p>Suppose I have a data such as the following, I want to plot a bar graph which would show each value of range as separate bar in the x-axis and the count in the yaxis.</p>

<pre><code>                 range  count
0                  0-2  172
1                02-05   82
2                05-10  117
3                10-15  164
4                15-20  141
5         20 and above  380
</code></pre>

<p>I tried the following,</p>

<pre><code>plt.bar(a['range'], a['count'], color='blue')
</code></pre>

<p>But i am getting the following error,</p>

<pre><code>ValueError: invalid literal for float(): 0-2
</code></pre>

<p>I tried converting it to string. Still the result is same. Can anybody help me in plotting this here?</p>

<p>Thanks</p>