Created
February 7, 2014 05:45
-
-
Save miggyb/8857896 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hi /r/mylittlepony! | |
// This code is released under the WTFPL | |
// http://www.wtfpl.net/about/ | |
from collections import defaultdict | |
f = open('output.csv', 'r') | |
flair = defaultdict(int) | |
for line in f: | |
flair[line.split(',')[1][:-2]] += 1 | |
del flair['None'] | |
del flair[''] | |
for pony in sorted(flair, key=flair.get, reverse=True): | |
print "%s,%s" % (pony, str(flair[pony])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment