title: Python: Create Timerseries Dummy Variable based on DateTime List
body: <p>I have two <code>dataframes.</code> <code>my_index</code> is containing the data for further analysis based on minute data <code>my_index['TIME']</code> in format <code>yyyy-mm-dd hh:mm:ss</code> (total length 100.000 rows).
  The other dataframe <code>release_plain</code>contains specific datetimes (same Time format) within the timespan of the other one (length 70). Both DateTimes are string format</p>
  
  <p>Now I want to match the dates of <code>release_plain</code> against those with <code>my_index</code> and when there is a match write a 1 in a new column <code>my_index['Dummy']</code> for a range 5 mins before and after the match (so in total eleven 1ns). </p>
  
  <p>What I have so far:</p>
  
  <pre><code>release_plain = pd.read_csv(infile)
  my_index = pd.read_csv(index_file)
  
  datetime = release_plain['Date'].astype(str) + ' ' + release_plain['Time'].astype(str)
  list_datetime = list(datetime)
  
  
  for date_of_interest in list_datetime:
      if my_index.loc[my_index['TIME']==date_of_interest]:
          my_index['Dummy'] == 1
      else:
          my_index['Dummy'] == 0
  </code></pre>
  
  <p>But this returns:</p>
  
  <pre><code>ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
  </code></pre>
  
  <p>And moreover, from what I have this will only create 1 Dummy for the specific DateTime but not the Dummy Range 5 mins before and after the Event.</p>