title: how to replace elements in a column using pandas
body: <p>Given this data frame:</p>
  
  <pre><code>&gt;&gt;&gt; a = pd.DataFrame(data={'words':['w1','w2','w3','w4','w5'],'value':np.random.rand(5)})
  &gt;&gt;&gt; a
  
       value   words
  0  0.157876    w1
  1  0.784586    w2
  2  0.875567    w3
  3  0.649377    w4
  4  0.852453    w5
  
  &gt;&gt;&gt; b = pd.Series(data=['w3','w4'])
  &gt;&gt;&gt; b
  
  0    w3
  1    w4
  </code></pre>
  
  <p>I'd like to replace the elements of <code>value</code> with <code>zero</code> but only for the words that match those in <code>b</code>.
  The resulting data frame should therefore look like this:</p>
  
  <pre><code>    value    words
  0  0.157876    w1
  1  0.784586    w2
  2  0           w3
  3  0           w4
  4  0.852453    w5
  </code></pre>
  
  <p>I thought of something along these lines: <code>a.value[a.words==b] = 0</code> but it's obviously wrong.</p>