title: Matching dates in CSV file to get index
body: <p>I have a CSV file with date, time, Positive and Negative columns. There are duplication of dates such as row 4 and 5 with different positive and negative value. I wanted to match the user input date with the dates in the csv file and return the index of the date in order for me to get the different positive and negative values. </p>
  
  <p>However, I tried to for loops but it always return me the first index of the date. </p>
  
  <pre><code>The CSV file look like this:
  Date      Pos Neg
  20180402   1   0
  20180402   0   1
  20180401   0   1
  20180402   1   0
  
  for i in range(len(combine_list)): 
  xdate = combine_list[i][0]
  print(xdate)
  if user_date3 ==xdate:
      print("yes")
      count_price +=1
      index1 = date_list.index(xdate)
      print(index1)
      #index1.append(index1)
  </code></pre>
  
  <p>Sorry if the code if messy as I just started to learn how to code. Any help is appreciated. Thanks! :)</p>