title: Pandas copy previous day's data based on key and date range
body: <p>I have below dataframe in Pandas. I want to roll/copy the data for the missing dates withing the start/end dates.</p>
  <p>I want to create rows for 3-MAR-21 and 4-MAR-21 as per below ---</p>
  <p>For 3-MAR-21, all the three loans L1, L2 and L3 rows should be copied from 2-MAR-21</p>
  <p>For 4-MAR-21, only L1 and L3 should be copied, because L2 ends on 3-MAR-21.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>DATE</th>
  <th>Loan ID</th>
  <th>Stat Date</th>
  <th>End Date</th>
  <th>Rate</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1-MAR-21</td>
  <td>L1</td>
  <td>1-MAR-21</td>
  <td>10-MAR-21</td>
  <td>100</td>
  </tr>
  <tr>
  <td>1-MAR-21</td>
  <td>L2</td>
  <td>1-MAR-21</td>
  <td>3-MAR-21</td>
  <td>150</td>
  </tr>
  <tr>
  <td>1-MAR-21</td>
  <td>L3</td>
  <td>1-MAR-21</td>
  <td>31-MAR-21</td>
  <td>160</td>
  </tr>
  <tr>
  <td>----</td>
  <td>---</td>
  <td>---</td>
  <td>---</td>
  <td>---</td>
  </tr>
  <tr>
  <td>2-MAR-21</td>
  <td>L1</td>
  <td>1-MAR-21</td>
  <td>10-MAR-21</td>
  <td>110</td>
  </tr>
  <tr>
  <td>2-MAR-21</td>
  <td>L2</td>
  <td>1-MAR-21</td>
  <td>3-MAR-21</td>
  <td>160</td>
  </tr>
  <tr>
  <td>2-MAR-21</td>
  <td>L3</td>
  <td>1-MAR-21</td>
  <td>31-MAR-21</td>
  <td>170</td>
  </tr>
  <tr>
  <td>----</td>
  <td>---</td>
  <td>---</td>
  <td>---</td>
  <td>---</td>
  </tr>
  <tr>
  <td>5-MAR-21</td>
  <td>L1</td>
  <td>1-MAR-21</td>
  <td>10-MAR-21</td>
  <td>90</td>
  </tr>
  <tr>
  <td>5-MAR-21</td>
  <td>L3</td>
  <td>1-MAR-21</td>
  <td>31-MAR-21</td>
  <td>140</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Update: Added more details</p>