title: Pandas / How to insert variable number of lines inside a DataFrame?
body: <p>Here is the structure of my dataframe</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>plan</th>
  <th>ADO_ver_x</th>
  <th>ADO_incr_x</th>
  <th>ADO_ver_y</th>
  <th>ADO_incr_y</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>3ABP3</td>
  <td>25.0</td>
  <td>4.0</td>
  <td>25.0</td>
  <td>7.0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to add <code>ADO_incr_y - ADO_incr_x</code> lines, which means in this case the result would be :</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>plan</th>
  <th>ADO_ver_x</th>
  <th>ADO_incr_x</th>
  <th>ADO_ver_y</th>
  <th>ADO_incr_y</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>3ABP3</td>
  <td>25.0</td>
  <td>4.0</td>
  <td>25.0</td>
  <td>5.0</td>
  </tr>
  <tr>
  <td>3ABP3</td>
  <td>25.0</td>
  <td>5.0</td>
  <td>25.0</td>
  <td>6.0</td>
  </tr>
  <tr>
  <td>3ABP3</td>
  <td>25.0</td>
  <td>6.0</td>
  <td>25.0</td>
  <td>7.0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Is there a Panda/Pythonic way to do that ?</p>
  <p>I was thinking something like :</p>
  <pre><code>reps = [ val2-val1 for val2, val1 in zip(df_insert[&quot;ADO_incr_y&quot;],df_insert[&quot;ADO_incr_x&quot;]) ]
  df_insert.loc[np.repeat(df.index_insert.values, reps)]
  </code></pre>
  <p>But I don't get the incremental progression :
  4 -&gt; 5, 5-&gt;-6, 6 -&gt; 7</p>
  <p>How can I get the index inside the list comprehension ?</p>