title: Pandas Convert Some Rows to Columns in Python
body: <p>So my dataset has some information by business n dates as below:</p>
  
  <pre><code>Business    Date    Value
  a         1/1/2017   127
  a         2/1/2017   89
  b         2/1/2017   122
  a         1/1/2018   555
  a         2/1/2018   455
  </code></pre>
  
  <p>I need this data as below format: How can i tranpose it . And i dont want multilevel in my output dataset</p>
  
  <pre><code>Business    1/1/2017  2/1/2017 1/1/2018  2/1/2018
   a           127         89     555        455
   b           N/A        122      N/A       N/A
  </code></pre>
  
  <p>I tried below syntax:</p>
  
  <pre><code>df = df.set_index(['Business','Date'])['Value'].unstack()
  df=df.pivot(index='Business', columns='Date', values='Value')
  </code></pre>
  
  <p>i got the output as below:</p>
  
  <pre><code>Date    1/1/2017    2/1/2017    1/1/2018    2/1/2018
  Business
   a        454         5555        555         444 
   b        -            444         -           -
  </code></pre>
  
  <p>when i print columns, it doesn't show LOB as column. My final dataframe should also include Business,Date fields as columns so that i can join this dataframe with another dataframe on business</p>