title: how can I create new table based on the previous table in pandas?
body: <p>following to this post
  <a href="https://stackoverflow.com/questions/30009948/how-to-reorder-indexed-rows-based-on-a-list-in-pandas-data-frame/30010004">How to reorder indexed rows based on a list in Pandas data frame</a></p>
  
  <pre><code>import pandas as pd
  df = pd.DataFrame({'name' : ['A', 'Z','C'],
                     'company' : ['Apple', 'Yahoo','Amazon'],
                     'height' : [130, 150,173]})
  
  df = df.pivot(index="name", columns="company", values="height").fillna(0)
  
  df.reindex(["Z", "C", "A"])
  
  
  company Amazon  Apple   Yahoo
  name            
     Z     0.0    0.0     150.0
     C.  173.0    0.0      0.0
     A     0.0   130.0     0.0
  </code></pre>
  
  <p>I wonder if I added more data and do this by following to this link <a href="https://stackoverflow.com/questions/27467730/is-there-a-way-to-copy-only-the-structure-not-the-data-of-a-pandas-dataframe">Is there a way to copy only the structure (not the data) of a Pandas DataFrame?</a></p>
  
  <pre><code>df_1 = pd.DataFrame({'name' : ['A','Z','B','C','D'],
                     'company' : ['Apple','Yahoo','Alebaba','Amazon','Google'],
                     'height' : [130, 150,160,173,180]})
  
  df_1 = df_1.pivot(index="name", columns="company", values="height").fillna(0)
  
  df_1 = df_1.reindex_like(df)
  </code></pre>
  
  <p>the result is being like below</p>
  
  <pre><code>company Amazon  Apple   Yahoo
      name            
         Z     0.0    0.0     150.0
         C   173.0    0.0      0.0
         A     0.0   130.0     0.0
  </code></pre>
  
  <p>but I would like to see the result like this</p>
  
  <pre><code>company Amazon  Apple   Yahoo   Alebaba Google
  name                    
   Z       0.0    0.0     150.0    0.0    0.0
   C     173.0    0.0       0.0    0.0    0.0
   A       0.0    130.0     0.0    0.0    0.0
   B       0.0    0.0       0.0   160.0   0.0
   D       0.0    0.0       0.0    0.0    180.0
  </code></pre>
  
  <p>this is fine with the small data but in case of thousand data, how can I fix this issues?</p>
  
  <p>the dataset that will be added to the previous data can locate in any position.</p>
  
  <p>any suggestion? T T</p>