title: Error when renaming columns to an existing Pandas Dataframe
body: <p>Basically this question is related to: <a href="http://stackoverflow.com/questions/34685825/jupyter-notebook-memory-usage-for-each-notebook">notebook-memory-usage</a>, the original post is a bit too old, so I guess it is better to start a new one.</p>
  
  <p>Here is portion of code:</p>
  
  <pre><code>def get_proc_info():
      # memory info from psutil.Process
      df_mem = []
      ....
      df_mem = pd.DataFrame(df_mem)
      df_mem.columns = ['user', 'pid', 'memory_GB', 'kernel_ID']
      return df_mem, ports
  </code></pre>
  
  <p>Errors out at <code>df_mem.columns = ['user', 'pid', 'memory_GB', 'kernel_ID']</code> as below:</p>
  
  <blockquote>
    <p>File "./notebook_mem_usage.py", line 64, in get_proc_info
        df_mem.columns = ['user', 'pid', 'memory_GB', 'kernel_ID']</p>
    
    <p>ValueError: Length mismatch: Expected axis has 0 elements, new values
    have 4 elements</p>
  </blockquote>
  
  <p>It would be appreciated if anyone can shed me more light, thank you very much in advance.</p>