title: Rename dataframe columns using pandas python
body: <p>I'm trying to change my dataframe columns names , i tried two methods but none of them worked .
  here is my code ; </p>
  
  <p>method 1 :</p>
  
  <pre><code>def func():   
      energy=pd.ExcelFile('Energy Indicators.xls').parse('Energy')
      energy=energy.iloc[16:][['Environmental Indicators: Energy','Unnamed:3','Unnamed: 4','Unnamed: 5']].copy() energy.columns()=['Country',
      'Energy Supply', 'Energy Supply per Capita', '%Renewable']
  return energy
  </code></pre>
  
  <p>method 2: </p>
  
  <pre><code>def func():
      energy=pd.ExcelFile('Energy Indicators.xls').parse('Energy')
      energy=energy.iloc[16:][['Environmental Indicators: Energy','Unnamed: 3','Unnamed: 4','Unnamed: 5']].copy()
  
      return energy.rename(columns={'Environmental Indicators: Energy': 'Country', 'Unnamed: 3': 'Energy Supply',
                                    'Unnamed: 4': 'Energy Supply per Capita', 'Unnamed: 5': '% Renewable'}, inplace=True)
  </code></pre>
  
  <p>Both of them return a NoneType Object .</p>
  
  <p>Here is the .xls file i'm working on : <a href="https://drive.google.com/file/d/0B80lepon1RrYeDRNQVFWYVVENHM/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/0B80lepon1RrYeDRNQVFWYVVENHM/view?usp=sharing</a></p>