In which we study Pandas


In [11]:
import pandas as pd
import matplotlib.pyplot as plt

In [12]:
data = pd.ExcelFile("intro_pandas.xls")

In [13]:
print data.sheet_names


[u'Sheet1', u'Sheet2', u'Sheet3']

In [14]:
data_sheet1 = data.parse(u'Sheet1')

In [15]:
data_sheet1


Out[15]:
Name Age Salary
0 Bob 18 100
1 Rob 55 500
2 Mike 37 770

In [16]:
data_sheet1.sort('Age')


Out[16]:
Name Age Salary
0 Bob 18 100
2 Mike 37 770
1 Rob 55 500

In [17]:
data_sheet1.sort('Salary')


Out[17]:
Name Age Salary
0 Bob 18 100
1 Rob 55 500
2 Mike 37 770

In [18]:
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [19]:
data_sheet1.plot('Name', 'Age')
plt.show()



In [20]:
data_sheet1.plot('Name', 'Salary')
plt.show()



In [20]: