title: Transform a dataframe
body: <pre><code>M     Product   Price
  -------------------------
  2014m1  Pepsi   55
  2014m1  Coke    60
  2014m2  Pepsi   55
  2014m2  Coke    62
  2014m3  Pepsi   55
  2014m3  Coke    63
  2014m4  Pepsi   55
  2014m5  Pepsi   55
  2014m6  Pepsi   55
  2014m8  Pepsi   58
  2014m9  Pepsi   58
  2014m10 Pepsi   58
  2014m11 Pepsi   58
  2014m12 Pepsi   58
  </code></pre>
  
  <p>I have some time series with two products Pepsi and Coke.My intention is to transform this table like table below.</p>
  
  <pre><code>M     Product Price
  --------------------------
  2014m1  Coke    60
  2014m2  Coke    62
  2014m3  Coke    63
  2014m4  Coke    NA
  2014m5  Coke    NA
  2014m6  Coke    NA
  2014m7  Coke    NA
  2014m8  Coke    NA
  2014m9  Coke    NA
  2014m10 Coke    NA
  2014m11 Coke    NA
  2014m12 Coke    NA
  2014m1  Pepsi   55
  2014m2  Pepsi   55
  2014m3  Pepsi   55
  2014m4  Pepsi   55
  2014m5  Pepsi   55
  2014m6  Pepsi   55
  2014m7  Pepsi   58
  2014m8  Pepsi   58
  2014m9  Pepsi   58
  2014m10 Pepsi   58
  2014m11 Pepsi   58
  2014m12 Pepsi   58
  </code></pre>
  
  <p>Namely in this table,every product have appropriate month and price.So can anybody help me to transform this table ?</p>