title: Merging Pandas DataFrame within a specific Date Range
body: <p>I've 2 DataFrames. One for <code>Invoice Data</code> and the other for <code>Promotion Dates</code>.</p>
  <p><code>Invoice Data</code> DataFrame</p>
  <pre><code>+------------+-------------+---------------+
  | LocationNo | InvoiceDate | InvoiceAmount |
  +------------+-------------+---------------+
  |      A     |  01-Jul-20  |       79      |
  +------------+-------------+---------------+
  |      B     |  01-Jul-20  |       72      |
  +------------+-------------+---------------+
  |      C     |  01-Jul-20  |       24      |
  +------------+-------------+---------------+
  |      A     |  02-Jul-20  |       68      |
  +------------+-------------+---------------+
  |      B     |  02-Jul-20  |       6       |
  +------------+-------------+---------------+
  |      C     |  02-Jul-20  |       27      |
  +------------+-------------+---------------+
  |      A     |  03-Jul-20  |       25      |
  +------------+-------------+---------------+
  |      B     |  03-Jul-20  |       62      |
  +------------+-------------+---------------+
  |      C     |  03-Jul-20  |       58      |
  +------------+-------------+---------------+
  |      D     |  03-Jul-20  |       36      |
  +------------+-------------+---------------+
  |      E     |  03-Jul-20  |       65      |
  +------------+-------------+---------------+
  |      F     |  03-Jul-20  |       81      |
  +------------+-------------+---------------+
  
  df_1 = pd.DataFrame({
      'LocationNo':['A','B','C','A','B','C','A','B','C','D','E','F'],
      'InvoiceDate':['01-Jul-20','01-Jul-20','01-Jul-20','02-Jul-20','02-Jul-20','02-Jul-20',
                    '03-Jul-20','03-Jul-20','03-Jul-20','03-Jul-20','03-Jul-20','03-Jul-20'],
      'InvoiceAmount':[79,72,24,68,6,27,25,62,58,36,65,81]
  })
  </code></pre>
  <p><code>Promotion Dates</code> DataFrame</p>
  <pre><code>+------------+----------------+--------------+
  | LocationNo | PromotionStart | PromotionEnd |
  +------------+----------------+--------------+
  |      A     |    01-Jul-20   |   02-Jul-20  |
  +------------+----------------+--------------+
  |      B     |    02-Jul-20   |   03-Jul-20  |
  +------------+----------------+--------------+
  |      C     |    03-Jul-20   |   05-Jul-20  |
  +------------+----------------+--------------+
  |      D     |    01-Jul-20   |   05-Jul-20  |
  +------------+----------------+--------------+
  |      E     |    02-Jul-20   |   02-Jul-20  |
  +------------+----------------+--------------+
  |      F     |    05-Jul-20   |   06-Jul-20  |
  +------------+----------------+--------------+
  
  df_2 = pd.DataFrame({
      'LocationNo' : ['A','B','C','D','E','F'],
      'PromotionStart':['01-Jul-20','02-Jul-20','03-Jul-20','01-Jul-20','02-Jul-20','05-Jul-20'],
      'PromotionEnd':['02-Jul-20','03-Jul-20','05-Jul-20','05-Jul-20','02-Jul-20','06-Jul-20',]
  })
  </code></pre>
  <p>My Task is to Merge both the DataFrames based on 2 conditions &amp; add value <code>Yes</code> to a new column <code>Promotion</code>
  if these conditions are met.</p>
  <p>conditions are as follows</p>
  <ol>
  <li><code>LocationNo</code> should match</li>
  <li>The <code>InvoiceDate</code> should be between the respective <code>LocationNo</code>'s <code>PromotionStart</code> and <code>PromotionEnd</code>.</li>
  </ol>
  <p>Basically, to merge only If the <code>InvoiceDate</code> falls between <code>PromotionStart</code> and <code>PromotionEnd</code> dates.</p>
  <p>My desired output is as below</p>
  <pre><code>+------------+-------------+---------------+-----------+
  | LocationNo | InvoiceDate | InvoiceAmount | Promotion |
  +------------+-------------+---------------+-----------+
  |      A     |  01-Jul-20  |       79      |    Yes    |
  +------------+-------------+---------------+-----------+
  |      B     |  01-Jul-20  |       72      |           |
  +------------+-------------+---------------+-----------+
  |      C     |  01-Jul-20  |       24      |           |
  +------------+-------------+---------------+-----------+
  |      A     |  02-Jul-20  |       68      |    Yes    |
  +------------+-------------+---------------+-----------+
  |      B     |  02-Jul-20  |       6       |    Yes    |
  +------------+-------------+---------------+-----------+
  |      C     |  02-Jul-20  |       27      |           |
  +------------+-------------+---------------+-----------+
  |      A     |  03-Jul-20  |       25      |           |
  +------------+-------------+---------------+-----------+
  |      B     |  03-Jul-20  |       62      |    Yes    |
  +------------+-------------+---------------+-----------+
  |      C     |  03-Jul-20  |       58      |    Yes    |
  +------------+-------------+---------------+-----------+
  |      D     |  03-Jul-20  |       36      |    Yes    |
  +------------+-------------+---------------+-----------+
  |      E     |  03-Jul-20  |       65      |           |
  +------------+-------------+---------------+-----------+
  |      F     |  03-Jul-20  |       81      |           |
  +------------+-------------+---------------+-----------+
  </code></pre>
  <p>I know how to merge columns based on multiple conditions. But, in this case, I need to merge within  <code>Date Range</code>.</p>
  <p>kindly, let me know how should i approach to solve this.</p>