def writeFromDict(dataDict, headers, csvFile):
  """
  Write dictionary to a CSV, where keys are row numbers and values are a list.
  """
  with open(csvFile, "wb") as f:
    writer = csv.writer(f, delimiter=",")
    writer.writerow(headers)
    for row in sorted(dataDict.keys()):
      writer.writerow(dataDict[row])
Write dictionary to a CSV, where keys are row numbers and values are a list.