title: Set value of pandas data frame on conditional
body: <p>I can't find a similar question for this query. However, I have a pandas dataframe where I want to use two of the columns to make conditional and if its true, replace the values in one of these columns.</p>
  
  <p>For example. One of my columns is the 'itemname' and the other is the 'value'.
  the 'itemname' may be repeated many times. I want to check for each 'itemname', if all other items with the same name have value 0, then replace these 'value' with 100.</p>
  
  <p>I know this should be simple, however I cannot get my head around it.</p>
  
  <p>Just to make it clearer, here </p>
  
  <pre><code>    itemname value
  0      a       0
  1      b       100
  2      c       0
  3      a       0
  3      b       75
  3      c       90
  </code></pre>
  
  <p>I would like my statement to change this data frame to</p>
  
  <pre><code>    itemname value
  0      a       100
  1      b       100
  2      c       0
  3      a       100
  3      b       75
  3      c       90
  </code></pre>
  
  <p>Hope that makes sense. I check if someone else has asked something similar and couldnt find something in this case.</p>