title: Group by Sum as new column name
body: <p>I am doing function where I am grouping by ID and summing the $ value associated with those IDs with this code for python:</p>
  
  <pre><code>df = df.groupby([' Id'], as_index=False, sort=False)[["Amount"]].sum();
  </code></pre>
  
  <p>but it doesnt rename the column. As such I tried doing this :</p>
  
  <pre><code>`df = df.groupby([' Id'], as_index=False, sort=False)`[["Amount"]].sum();.reset_index(name ='Total Amount')
  </code></pre>
  
  <p>but it gave me error that TypeError: reset_index() got an unexpected keyword argument 'name'</p>
  
  <p>So I tried doing this finally following this post:<a href="https://stackoverflow.com/questions/30244952/python-pandas-create-new-column-with-groupby-sum">Python Pandas Create New Column with Groupby().Sum()</a></p>
  
  <pre><code>df = df.groupby(['Id'])[["Amount"]].transform('sum'); 
  </code></pre>
  
  <p>but it still didnt work.</p>
  
  <p>What am I doing wrong?</p>