title: Pandas Pivot with extra column
body: <p>I have a simple question about how to pivot a Pandas Dataframe with the extra problem of having an additional column.</p>
  
  <p>The dataset looks like this one:</p>
  
  <pre><code>X = pd.DataFrame({'country':['Peru','Peru','Japan','Japan'],'method':['m1','m2','m1','m2'], 'value':[1,2,3,4]})
  
  Country   |   Method    |   Value
  Peru      |   m1        |   1
  Peru      |   m2        |   2
  Japan     |   m1        |   3
  Japan     |   m2        |   4
  </code></pre>
  
  <p>All the "Countries" have values for all the "Methods"
  I would like to pivot this dataframe with each Country as a column but I need to carry on the method:</p>
  
  <pre><code>Peru |  Japan | Method
  1    |  3     | m1
  2    |  4     | m4
  </code></pre>
  
  <p>Thanks for the help!   </p>