Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kgislData = open("C:\\kgisl.csv").read().splitlines()
- countByDegree = {}
- for i in kgislData:
- degree = i.split("\t")[3] #CSE
- if(countByDegree.has_key(degree)):
- countByDegree[degree] = countByDegree[degree] + 1
- else:
- countByDegree[degree] = 1 #{"CSE" : 1}
- for i in countByDegree:
- print(i + "\t" + str(countByDegree[i]))
Add Comment
Please, Sign In to add comment