title: Searching two csv files for matching variables using Python
body: <p>I am writing a code to create a total list of players from a set of descriptions. Have one CSV file with descriptions of each NFL play in the past year, such as "44-J.STARKS RIGHT GUARD TO GB 41 FOR 2 YARDS (31-K.CHANCELLOR, 50-K.WRIGHT)." or " 3-R.WILSON PASS SHORT RIGHT TO 11-P.HARVIN RAN OB AT SEA 29 FOR 9 YARDS." I also have an updating list of running backs (and in the future, the other positions), that I am adding to manually if the player appears in a run play, but is not on the list of running backs already. my code looks like-</p>
  
  <pre><code>rbs=open('rbs.csv', 'rb+a') #open the running back file
  with open('/Users/masongardner/Desktop/pbp-2014.csv', 'rb') as csvfile: #opens the list of descriptions
      reader = csv.reader(csvfile, delimiter=',', quotechar='|')
      reader.next() #skip the title row
      for row in reader:
          desc=row[14] #corresponds with the description of each play
          #print desc
          for line in rbs: #each line should be another running back in the running backs CSV
                  if re.findall(line[0], desc, re.I):
                      print 'found'
                      print line
                      print desc
                  elif re.findall('no play| KICKS | KNEEL | KNEELS | PUNT | PUNTS | Extra point |Field goal|Two-minute|END GAME|timeout|end of quarter|end quarter|no huddle', desc, re.I):
                      pass
                  elif re.findall('right guard|right end|right tackle|left guard|left tackle|left end|up the middle', desc,re.I):
                      print "did not find it"
                      print desc
                      rback=raw_input('running back:')
                      with open('rbs.csv','a') as rbfile:
                          rbwriter=csv.writer(rbfile, delimiter=' ', quotechar='|',quoting=csv.QUOTE_MINIMAL)
                          rbwriter.writerow([rback])
                  else:
                      print "did not find it"
                      print desc
      rbs.close()
  </code></pre>
  
  <p>As I am just starting out with this, I put a single input for the 'rbs' file as Eddy Lacy, who should be found. The thing is, when I run my code, I receive no output at all. I am returned only exit status of 0.</p>
  
  <p>I don't see why this is the case, as there are thousands of lines, which should give me SOME output. Can someone please help me with what is wrong about my process?</p>
  
  <p>ADDITION:
  As it stands at this point, my rbs.csv file is formatted like such when I open it with textedit</p>
  
  <p>27-E.LACY</p>
  
  <p>24-F.GORE</p>
  
  <p>etc.</p>
  
  <p>And when I view one of the lines for the play descriptions, the file is formatted as such:
  2014090400,2014-09-04,1,13,32,GB,SEA,1,10,39,,0,,0,"(13:32) (NO HUDDLE) 44-J.STARKS RIGHT GUARD TO GB 41 FOR 2 YARDS (31-K.CHANCELLOR, 50-K.WRIGHT).",0,,,2014,2,"NO HUDDLE",RUSH,1,0,0,0,,0,0,0,,0,0,0,0,0,0,"RIGHT GUARD",39,OWN,0,,0,,0</p>