title: Append new row when using pandas iterrows()?
body: <p>I have the following code where I create <code>df['var'2]</code> and alter <code>df['var1']</code>. After performing these changes, I would like to append the <code>newrow</code> (with <code>df['var'2]</code>)  to the dataframe while keeping the original (though now altered) row (which has <code>df['var1']</code>). </p>
  
  <pre><code>for i, row in df.iterrows():
      while row['var1'] &gt; 30: 
          newrow = row
          newrow['var2'] = 30
          row['var1'] = row['var1']-30
          df.append(newrow)
  </code></pre>
  
  <p>I understand that when using <code>iterrows()</code>, row variables are copies instead of views which is why the changes are not being updated in the original dataframe. So, how would I alter this code to actually append newrow to the dataframe?</p>
  
  <p>Thank you!</p>