title: Filter Excel Dataframe with Pandas
body: <p>So I am doing some merged using Pandas using a name-map because the two files I want don't have exact name names to merge on easily. But My Pdata sheet has lists of dates from 2014 to 2016, but I want to filter the sheet down to only contain dates from 1/1/2015 - 31/12/2016.
  Below is the code that I currently have and I am not sure how to/if I can filter on date before the merge.</p>
  
  <pre><code>import pandas as pd
  path=  'C:/Users/Rukgo/Desktop/Match thing/'
  name_map = pd.read_excel(path+'name_map.xls',sheetname=0)
  Tdata = pd.read_excel(path+'2015_TXNs.xls',sheetname=0)
  pdata = pd.read_excel(path+'Pipeline.xls', sheetname=0)
  #pdata = pdata[(1/1/2015 &lt;=pdata.date)&amp;(pdata.date &lt;=31/12/2015)]
  merged = pd.merge(Tdata, name_map, how="left", on="Local Customer")
  merged.to_excel(path+"results.xls")
  mdata = pd.read_excel(path +'results.xls',sheetname=0)
  final_merge = pd.merge(mdata, pdata, how='right', on='Client')
  final_merge = final_merge[final_merge.Amount_USD !=0]
  final_merge.to_excel(path+"Final Results.xls")
  </code></pre>