title: Pivot a dataframe
body: <p>I am new to python. I have a dataframe in below format</p>
  <p><img src="https://i.stack.imgur.com/zCg9A.png" alt="enter image description here" /></p>
  <p>I want to pivot it to below format</p>
  <p><img src="https://i.stack.imgur.com/PDIT7.png" alt="enter image description here" /></p>
  <p>How can i do this?</p>