In Eclipse, copy and paste the following program to create a new module:
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_spss('markData.sav')
df['Final'] = df['CW'] * 0.5 + df['Exam'] * 0.5
gradeList = []
gradeFeq = {'A':0,'B':0,'C':0,'D':0,'F':0}
for row in df.index:
if df['Final'][row] < 40:
pass
fig = plt.figure(figsize=(10,8)) # width x height in inches
ax1 = fig.add_subplot(111)
ax1.bar(['A','B','C','D','F'],
[gradeFeq['A'],gradeFeq['B'],gradeFeq['C'],gradeFeq['D'],gradeFeq['F']])
ax1.set_xlabel('Grade')
ax1.set_ylabel('Student Numbers')
ax1.set_title('Grade Distribution')
plt.show()