Skip to content

Instantly share code, notes, and snippets.

@louissimps
Created February 22, 2019 17:16
Show Gist options
  • Save louissimps/6b8d7156c01800018b20c09590cca4b3 to your computer and use it in GitHub Desktop.
Save louissimps/6b8d7156c01800018b20c09590cca4b3 to your computer and use it in GitHub Desktop.
# Python generates bytes for csv this will remove the stupid b' before everything
with io.open(FILE_NAME, encoding='utf-8') as f:
reader = csv.DictReader( f, fieldnames = ("ID","Control Description","Low","Moderate","High"))
for row in reader:
for s in row:
row[s] = row[s][2:-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment