Python: Plot a bar graph for a pandas data frame with x axis using a given column
<p>I want to plot a bar chart for the following pandas data frame on Jupyter Notebook. </p>

<pre><code>      | Month | number
-------------------------
    0 | Apr   |  6.5
    1 | May   |  7.3
    2 | Jun   |  3.9
    3 | Jul   |  5.1
    4 | Aug   |  4.1
</code></pre>

<p>I did:</p>

<pre><code>%matplotlib notebook
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('ggplot')
trend_df.plot(kind='bar')
</code></pre>

<p>How do I make sure x-axis is actually showing month here?</p>

<pre><code>store the data in a csv file.

example i named my file plot.csv

    save data in following format in plot.csv

Month,number

Apr,6.5

May,7.3

Jun,3.9

Jul,5.1

Aug,4.1


import pandas as pd

import matplotlib.pyplot as plt

import numpy as np

import csv

#first read the data
data = pd.read_csv('plot.csv',sep=',')

print(data)
#create  a data frame
df = data.ix[-5:,['Month','number']]
#plot
df.plot(kind = 'bar')

plt.show()
#for ggplot
plt.style.use('ggplot')

df.plot()

plt.show()
</code></pre>

python pandas jupyter-notebook python-ggplot