title: Select DataFrame row by time range
body: <p>I need to select the rows +- 1sec from specific lines (marked as to_pick)</p>
  
  <p>I can do it with loops, but I looking for more elegant way</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  N = 1000
  tidx = pd.date_range('2019-07-01 09:30:00', periods=N, freq='S')
  np.random.seed(3)
  data = np.random.randn(N)
  ts = tidx + pd.to_timedelta(pd.np.random.randn(N), unit='s')
  
  df = pd.DataFrame({'Time': ts, 'to_pick': pd.np.random.randn(N) &gt; 0.98, 'start': ts - pd.to_timedelta(1, 's'), 'end': ts + pd.to_timedelta(1, 's')})
  df.loc[~df['to_pick'], 'start'] = pd.np.nan
  df.loc[~df['to_pick'], 'end'] = pd.np.nan
  </code></pre>
  
  <p>I am looking for something like</p>
  
  <pre><code> df['Time'].between(df['start', df['end'])
  </code></pre>
  
  <p>that will work to combine the conditions</p>