title: Can't change column names in pandas data
body: <p>I have a python dictionary that looks like this:</p>
  
  <pre><code>d = {'comp_1': {'property_4': 24, 'property_2': 45, 'property_3': 124, 'missing': 39, 'property_1': 16}, 
   'comp_2': {'property_4': 23, 'property_2': 49, 'property_3': 126, 'property_1': 16, 'missing': 38}, 
   'comp_3': {'property_4': 24, 'property_2': 43, 'property_1': 19, 'missing': 30, 'property_3': 116}}
  </code></pre>
  
  <p>When I load it into panda dataframe and try to print it it looks as follows:</p>
  
  <pre><code>df = pd.DataFrame.from_dict(hits, orient='index')
  print(df)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>        missing  property_1  property_2  property_3  property_4
  comp_1       39          16          45         124          24
  comp_2       38          16          49         126          23
  comp_3       30          19          43         116          24
  </code></pre>
  
  <p>Now, I want to rename the columns, so I try:</p>
  
  <pre><code>df = pd.DataFrame.from_dict(hits, orient='index' columns=reversed(['Missing', 'P1', 'P2', 'P3', 'P4']))
  </code></pre>
  
  <p>which yields empty data frame (which I assume because these keys do not exist in dictionary?):</p>
  
  <pre><code>Empty DataFrame
  Columns: []
  Index: []
  </code></pre>
  
  <p>If I try this instead:</p>
  
  <pre><code>df = pd.DataFrame.from_dict(hits, orient='index')
  columns = reversed(['Missing', 'P1', 'P2', 'P3', 'P4'])
  df.columns=columns
  </code></pre>
  
  <p>columns are renamed by order is not preserved, so each time I run the code the number do not correspond to the column, e.g:</p>
  
  <pre><code>        P4  P3   P2  P1  Missing
  comp_1  16  24  124  45       39
  comp_2  16  23  126  49       38
  comp_3  19  24  116  43       30
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>        P4  P3  P2   P1  Missing
  comp_1  24  16  39  124       45
  comp_2  23  16  38  126       49
  comp_3  24  19  30  116       43
  </code></pre>
  
  <p>I'm guessing I need to somehow provide keys from the nested dictioary when I load data into dataframe, but I'm not sure how to do it. Or is it something else I need to do?</p>
  
  <p><strong>Edit:</strong>
  I also tried renaming columns with dictionary as follows:</p>
  
  <pre><code>df.rename({'missing': 'Missing', 'property_1': 'P1', 'property_2': 'P2', 'property_3': 'P3',
             'property_4': 'P4'})
  </code></pre>
  
  <p>but still old names are shown</p>