anonymize_8.py 333 B

1234567891011
  1. def save_pseudonyms():
  2. fn = os.path.abspath("pseudonyms.csv")
  3. print("Saving %d unique NHS Number pseudonyms to %s" % (len(LOOKUP), fn))
  4. f = open(fn, "w")
  5. f.write("Real_NHS_Number,Pseudonym_NHS_Number\n")
  6. for nhs_number in LOOKUP.keys():
  7. f.write("%d,%d" % (nhs_number, LOOKUP[nhs_number]) + "\n")
  8. main()