title: Iterating Through Rows of Pandas DataFrame - change series value based on values in another series?
body: <p>When iterating through the rows of a DataFrame, how do I change the value of one element based on the value on another element in the same row?</p>
  
  <p>I have the following code:</p>
  
  <pre><code>for index, row in df.iterrows():
      if (row["A"] in mult):
          row["B"] = row["B"] * mult[row["A"]]
  </code></pre>
  
  <p>This iterates through each row and sees if the value in "A" is present in a key in the dictionary (<code>mult</code>). If it is in the dictionary, series "B" is multiplied by the floating point value coming from the dictionary. </p>
  
  <p>The code runs without reporting an error - but when I examine the df it hasn't changed in the DataFrame.</p>
  
  <p>Thanks - Steve</p>