title: How to spread a column in a Pandas data frame
body: <p>I have the following pandas data frame:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  df = pd.DataFrame({
                 'fc': [100,100,112,1.3,14,125],
                 'sample_id': ['S1','S1','S1','S2','S2','S2'],
                 'gene_symbol': ['a', 'b', 'c', 'a', 'b', 'c'],
                 })
  
  df = df[['gene_symbol', 'sample_id', 'fc']]
  df
  </code></pre>
  
  <p>Which produces this:</p>
  
  <pre><code>Out[11]:
    gene_symbol sample_id     fc
  0           a        S1  100.0
  1           b        S1  100.0
  2           c        S1  112.0
  3           a        S2    1.3
  4           b        S2   14.0
  5           c        S2  125.0
  </code></pre>
  
  <p>How can I spread <code>sample_id</code> so that in the end I get this:</p>
  
  <pre><code>gene_symbol    S1   S2
  a             100   1.3
  b             100   14.0
  c             112   125.0
  </code></pre>