title: Create duplicate row in Pandas dataframe based on condition, and change values for a specific column
body: <p>I have a Pandas dataframe with multiple columns (suppose in the following format to simplify the example):-</p>
  <pre><code>Item        Interval    Specs
  Chocolate      0        0.001
  Chocolate      3        0.002
  Chocolate      5        0.007
  Milk           0        0.004
  Milk           2        0.008
  ....
  </code></pre>
  <p>What I would like to do is to create duplicate rows for each of the original rows in the dataframe wherein, the <code>Interval</code> value is <code>0</code>, and have this for other <code>Interval</code> cases with the value of <code>Interval</code> changed. For instance, the <code>Item</code> Chocolate in the original dataframe has 3 cases with <code>Interval</code> <code>0, 3 and 5</code>. For the case wherein <code>Interval</code> is 0, I would like to duplicate this rows and keep the <code>Specs</code> value same, but only modify the <code>Interval</code> value and create 2 duplicate copies i.e. with <code>Interval</code> values 3 and 5. Similarly for the Milk <code>Item</code>, I want to create 1 duplicate row with <em>Interval</em> changed to 2. (Number of duplicate rows to be created thus depends directly on the number of unique <code>Interval</code> values for individual <code>Item</code>).</p>
  <p>The expected dataframe is:</p>
  <pre><code>Item        Interval    Specs
  Chocolate      0        0.001
  Chocolate      3        0.002
  Chocolate      5        0.007
  Chocolate      3        0.001   --Duplicate row added and Interval value changed
  Chocolate      5        0.001   --Duplicate row added and Interval value changed
  Milk           0        0.004 
  Milk           2        0.008   
  Milk           2        0.004   --Duplicate row added and Interval value changed
  </code></pre>
  <p>A similar question (<a href="https://stackoverflow.com/questions/61833866/duplicate-rows-based-on-value-with-condition">Duplicate rows based on value with condition</a>) on SO focuses on creating duplicate rows based on condition, but not on changing the values in the dataframe corresponding to the other rows. Any suggestions on how to accomplish this would be much appreciated.</p>