title: Spread data across multiple columns
body: <p>I have a Pandas DataFrame <code>df</code> like this:</p>
  
  <pre><code>            name  value
  2014-01-01  temp   10.0
  2014-01-01     p  101.0
  2014-01-02  temp   11.5
  2014-01-02     p  100.0
  </code></pre>
  
  <p>I would like to build a new DataFrame with unique index
  and with one column per data.</p>
  
  <p>Something like <code>df2</code> :</p>
  
  <pre><code>            temp      p
  2014-01-01  10.0  101.0
  2014-01-02  11.5  100.0
  </code></pre>
  
  <p>My first idea was to create a new DataFrame using</p>
  
  <pre><code>df2 = pd.DataFrame(index=df.index.unique(), columns=df['name'].unique())
  </code></pre>
  
  <p>and to use a for loop to populate this DataFrame</p>
  
  <pre><code>for col in df['name'].unique():
      df2[col] = df[df['name']==col]['value']
  </code></pre>
  
  <p>but I think that Pandas can do this much more efficiently.</p>
  
  <p>Any idea ?</p>