title: Group by at Row level in Pandas
body: <p>I'm a newbie to Python-Pandas.
  I've sample dataset like</p>
  
  <pre><code>PRODUCT REGION  COUNTRY MEASURE     Month_ID     QTY
  P1      West    UK      M1          Mon_1        200
  P1      West    UK      M2          Mon_1        150
  P1      East    JAPAN   M1          Mon_1        100
  P1      East    JAPAN   M2          Mon_1        100
  P1      West    UK      M1          Mon_2        300
  P1      West    UK      M2          Mon_2        450
  P1      East    JAPAN   M1          Mon_2        500
  P1      East    JAPAN   M2          Mon_2        600
  </code></pre>
  
  <p>I want data as below:</p>
  
  <pre><code>PRODUCT REGION  COUNTRY MEASURE     Month_ID     QTY
  P1      West    UK      M1          Mon_1        200
  P1      West    UK      M2          Mon_1        150
  P1      West    UK      NEW_M       Mon_1        350
  P1      East    JAPAN   M1          Mon_1        100
  P1      East    JAPAN   M2          Mon_1        100
  P1      East    JAPAN   NEW_M       Mon_1        200
  P1      West    UK      M1          Mon_2        300
  P1      West    UK      M2          Mon_2        450
  P1      West    UK      NEW_M       Mon_2        750
  P1      East    JAPAN   M1          Mon_2        500
  P1      East    JAPAN   M2          Mon_2        600
  P1      East    JAPAN   NEW_M       Mon_2        1100
  </code></pre>
  
  <p>I want to group by columns <code>(PRODUCT, REGION, COUNTRY, Month_ID)</code> with <code>SUM(QTY)</code>.</p>
  
  <p>And new rows will be added after each group with column <code>MEASURE</code> as <code>NEW_M</code>.</p>