title: How do i change column name in a dataframe in python pandas
body: <p>im new to python, i used to code...</p>
  <pre><code>StoreGrouper= DonHenSaless.groupby('Store')
  StoreGrouperT= StoreGrouper[&quot;SalesDollars&quot;].agg(np.sum)
  StoreGrouperT.rename(columns={SalesDollars:TotalSalesDollars})
  </code></pre>
  <p>to group stores and sum by the SalesDollars then rename SalesDollars to TotalSalesDollars. it outputted the following error...</p>
  <p>NameError: name 'SalesDollars' is not defined</p>
  <p>I also tried using quotes</p>
  <pre><code>StoreGrouper= DonHenSaless.groupby('Store')
  StoreGrouperT= StoreGrouper[&quot;SalesDollars&quot;].agg(np.sum)
  StoreGrouperT= StoreGrouperT.rename(columns={'SalesDollars':'TotalSalesDollars'})
  </code></pre>
  <p>This output the error: rename() got an unexpected keyword argument 'columns'</p>
  <p>Here is my df
  <a href="https://i.stack.imgur.com/jppGl.png" rel="nofollow noreferrer">df</a></p>