Skip to content

Instantly share code, notes, and snippets.

@rebeccawilliams
Created February 20, 2014 02:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rebeccawilliams/9105832 to your computer and use it in GitHub Desktop.
Save rebeccawilliams/9105832 to your computer and use it in GitHub Desktop.
import csv
requests = open("DC311.csv")
tags = open("graffiti.csv", 'w')
read_file = csv.reader(requests)
write_file = csv.writer(tags)
Graffiti = 0
for line in read_file:
if line[5].strip() == 'Graffiti':
Graffiti += 1
write_file.writerow(line)
print "There are %s Graffiti Removla service requests in DC as of 2009" % (Graffiti)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment