title: How to unpivot a pandas dataframe based on some grouped column?
body: <p>I am trying to unpivot this below dataframe.</p>
  
  <p><strong>My dataframe:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/o0xKj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o0xKj.png" alt="enter image description here"></a></p>
  
  <p><strong>Output</strong></p>
  
  <p><a href="https://i.stack.imgur.com/yceEq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yceEq.png" alt="enter image description here"></a></p>