title: Pivoting pandas with removal of some headers and renaming of some indexes
body: <p>I have the following pandas dataframe:</p>
  
  <pre><code>    count  event      date
  0    1544  'strike'   2016-11-01
  1     226  'defense'  2016-11-01
  2    1524  'strike'   2016-12-01
  3     246  'defense'  2016-12-01
  4    1592  'strike'   2017-01-01
  5     245  'defense'  2017-01-01
  </code></pre>
  
  <p>I want to pivot/transform it in such a way the final output looks like this:</p>
  
  <pre><code>event     2016-11-01 2016-12-01 2017-01-01 2017-02-01 2017-03-01                                                                     
  'strike'        1544       1524       1592       1608       1654   
  'defense'        226        246        245        210        254
  </code></pre>
  
  <p>but what i'm getting now upon pivoting is this:</p>
  
  <pre><code>                        count          count            count           count             count\
  date          2016-11-01 2016-12-01 2017-01-01 2017-02-01 2017-03-01   
  event                                                                  
  'strike'            1544       1524       1592       1608       1654   
  'defense'            226        246        245        210        254   
  </code></pre>
  
  <p>is there any way i could remove the entire empty row ahead of the <code>event</code> index-name and rename the <code>date</code> index-name with <code>event</code> as its index-name and also remove the unwanted <code>count</code> appearing in the first row of the data frame? The data seems to be transforming correctly i just want to get rid of these headers and indexes and have the renamed and removed properly. I also don't want the row labels in the desired output.</p>
  
  <p>This is what i've been trying till now:</p>
  
  <pre><code>output = df.pivot(index='event', columns='date')
  print(output)
  </code></pre>