title: Create pandas column of pd.date_range
body: <p>I have data like this:</p>
  
  <pre><code>import datetime as dt
  import pandas as pd
  df = pd.DataFrame({'date':[dt.datetime(2018,8,25), dt.datetime(2018,7,21)],
                     'n':[10,7]})
  </code></pre>
  
  <p>I would like to create a third column which contains a date range created by pd.date_range, using 'date' as the start date and 'n' as the number of periods.
  So the first entry should be:</p>
  
  <pre><code>pd.date_range(dt.datetime(2018,8,25), periods=10, freq='d')
  </code></pre>
  
  <p>(I have a list of "target" dates, and my goal is to check whether the date_range contains any of those target dates).</p>
  
  <p>I tried this:</p>
  
  <pre><code>df['date_range'] = df.apply(lambda x: pd.date_range(x['date'],
                                                       x['n'],
                                                       freq='d'))
  </code></pre>
  
  <p>But this gives a KeyError: ('date', 'occurred at index date')</p>
  
  <p>Any idea on how to do this without using a for loop, or is there a better solution altogether?</p>