Skip to content

Instantly share code, notes, and snippets.

View stuartathompson's full-sized avatar

Stuart A. Thompson stuartathompson

View GitHub Profile
@stuartathompson
stuartathompson / ranker.py
Created April 18, 2012 18:08 — forked from JoeGermuska/ranker.py
Example of how to convert a csv file to a table of ranked headers for each row
#!/usr/bin/env python
import csv
import json
r = csv.reader(open("data.csv"))
headers = r.next()
countries = headers[1:]
def saveData(output):
filename = "ranked"
print "Writing JSON output to %s.json" % filename