AttributeError: 'list' object has no attribute 'rename'
<pre><code>df.rename(columns={'nan': 'RK', 'PP': 'PLAYER','SH':'TEAM','nan':'GP','nan':'G','nan':'A','nan':'PTS','nan':'+/-','nan':'PIM','nan':'PTS/G','nan':'SOG','nan':'PCT','nan':'GWG','nan':'PPG','nan':'PPA','nan':'SHG','nan':'SHA'}, inplace=True)     
</code></pre>

<p>This is my code to rename the columns according to  <a href="http://www.espn.com/nhl/statistics/player/_/stat/points/sort/points/year/2015/seasontype/2" rel="nofollow">http://www.espn.com/nhl/statistics/player/_/stat/points/sort/points/year/2015/seasontype/2</a></p>

<p>I want both the tables to have same column names. I am using python2 in spyder IDE.<br>
When I run the code above, it gives me this error:</p>

<pre><code>AttributeError: 'list' object has no attribute 'rename'
</code></pre>