title: adjustment of values inside loop with condition in data frame
body: <p>I have a data frame as below.</p>
  
  <pre><code>code    score   
  ac       2.4        
  xz       2.6         
  ui       3.4            
  zy       1.2    
  </code></pre>
  
  <p>I want to adjust score where score >2.5 and the excess score (i.e. 2.6-2.5=0.1) should be distributed to all other according to there existing score. The process should be doing this till the time every score is &lt;=2.5. </p>
  
  <p>Please help me.</p>
  
  <p>output:</p>
  
  <pre><code>code    score    
  ac       2.5             
  xz       2.5           
  ui       2.5                   
  zy       2.1                
  </code></pre>