title: Create a new colum with the aggregation of the sum of another colum grouped by another column - Python Pandas
body: <p>I would like to create a new column for the follow data set which will receive the sum of the ForecastSum column grouped by each PNO row/column value:</p>
  <p><a href="https://i.stack.imgur.com/rbRrY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rbRrY.png" alt="enter image description here" /></a></p>
  <p>So I would like to create a new column &quot;ForecastPNO&quot; for this df which will receive as example for PNO 8007205 the groouped sum by the ForecastSUM values (6 + 7 = 13) for all the rows, and consecutivaly for the others PNO values, so the order of the sum by each index should be following the order of the PNO column:<br />
  13/13/13/ 5/5/5 /9/9/9</p>
  <p>The table with this new column should have the same numbers of index as it is in the df dataset image shared.</p>