title: How to get uniq values of a column into multiple column and another column values its value
body: <p>Hi i abelow data and dataframe where ..</p>
  <p><strong>I have a DataFrame values like below:</strong></p>
  <pre><code>name        managed_by
  host1       sam
  host2       sam
  host3       sam
  host4       sam
  host5       Peter
  host6       Peter
  host7       Jesse
  host8       Jesse
  host9       Patrick
  host10      Banu
  host11      Banu
  </code></pre>
  <p><strong>Dataframe:</strong></p>
  <pre><code>df2 = pd.read_csv(&quot;server.csv&quot;, usecols=['name', 'managed_by'])
  df2 = df2.value_counts('managed_by')
  print(df2)
  </code></pre>
  <p>When i run it, it displays below..</p>
  <pre><code>managed_by
  Sam     4
  Peter   2
  Jesse   2
  Patrick 1
  Banu    2
  </code></pre>
  <p>If Values are like below after pivot the i want all column values to be stripped for <code>Nan</code></p>
  <pre><code>Sam         Peter   Jesse   Patrick     Banu
  host1       host5   host7   host9       host10
  host2       host6   host8               host11
  host3       Nan     Nan                 Nan
  host4       Nan     Nan                 Nan
  Nan         host22  Nan                 Nan
  host23      Nan     Nan                 Nan
      
  </code></pre>
  <p><strong>I want below:</strong></p>
  <pre><code>Sam         Peter   Jesse   Patrick     Banu
  host1       host5   host7   host9       host10
  host2       host6   host8               host11
  host3       host22                      
  host4                           
  host23      
  
  
      
  </code></pre>
  <p><strong>What i did:</strong></p>
  <pre><code>df2 = df2.pivot(columns='managed_by', values='name').replace(np.nan, '')
  </code></pre>
  <p>this did worked but if i have huge file then it will fill <code>Nan</code> for Blank rows in a column .</p>