title: Filtering csv file based on user input with python
body: <p>I have a large data base that looks like this:</p>
  
  <pre><code>id, Start Time, End Time
  0, 2017-01-01 00:00:21, 2017-01-01 00:11:41
  1, 2017-01-01 00:00:45, 2017-01-01 00:11:46
  2, 2017-02-01 00:00:57, 2017-02-01 00:22:08
  3, 2017-03-01 00:01:10, 2017-03-01 00:11:42
  4, 2017-01-01 00:01:51, 2017-01-01 00:12:57
  </code></pre>
  
  <p>Using pandas would probably be easier to do this, but I don't have much experience with it. I have researched modules such as <code>arrow</code> and <code>datetime</code> and would like to filter the data based on the user's input. Using that input, the user is returned filtered data. For example:</p>
  
  <pre><code>def get_month('data.csv'):
      month = input('\nWhich month? January, February, March, April, May, or June?\n')
      date = '1 ' + month + ', 2017'
      with open(city_data, 'r') as fin, open('userdata.csv', 'w') as fout:
           writer = csv.writer(fout, delimiter=' ')
           for row in csv.reader(fin, delimiter=' '):
               if row[0] == arrow.get(date,'D MMMM, YYYY').format('YYYY-MM-DD'):
                   return writer.writerow(row)
  </code></pre>
  
  <p>Am I approaching this correctly? I think I may be going in the wrong direction in the <code>date = '1 ' + month + ', 2017'</code> part. Is there a way I could filter the data with just an input like <code>January</code>?</p>