title: Calculate percentage share within rows of dataframe
body: <p>I have a dataframe with various states GDP data divided in multiple sectors. I am trying to get the percentage contribution of primary, secondary and tertiary sectors as a percentage of total GDP for all the states.
  Below is the dataframe and I am not sure how I can approach towards this. <a href="https://i.stack.imgur.com/SLbx3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SLbx3.png" alt="DataFrame"></a></p>
  
  <p>Below are the results I am trying to achieve: </p>
  
  <pre><code>Primary % Contribution = (Primary for that state/ State GSDP )* 100 
  Secondary % Contribution = (Secondary for that state/ State GSDP )* 100 
  Tertiary % Contribution = (Tertiary for that state/ State GSDP )* 100 
  </code></pre>
  
  <p>I am trying to get an output of this as below. </p>
  
  <p><a href="https://i.stack.imgur.com/8QWkL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8QWkL.png" alt="Expected Result"></a></p>