title: Pandas when renaming a column, key error is encountered
body: <p>I have the below code to rename a column</p>
  <pre><code>df.rename(columns = {'Long Name 1':'Court'}, inplace = True)
  </code></pre>
  <p>But encounter the below error</p>
  <pre><code>KeyError: &quot;['Long Name 1'] not in index&quot;
  </code></pre>
  <p>Not sure why there is an error. When I see the columns in the df, it exists</p>
  <pre><code>print(df.columns)
  </code></pre>
  <p>Result:</p>
  <pre><code>Index(['Activity', 'Date', 'Hirer Category', 'No of Slots', 'Slot Status', 'Start Time', 'Court', 'Long Name 1'], dtype='object')
  </code></pre>
  <p>Why am I not able to rename column 'Long Name 1'?</p>