title: Assign value to a pandas dataframe column based on string condition
body: <p>Suppose I have a dataframe,</p>
  
  <pre><code>data
  id  URL
  1   www.pandora.com
  2   m.jcpenney.com
  3   www.youtube.com
  4   www.facebook.com
  </code></pre>
  
  <p>I want to create a new column based on a condition that if the URL contains some particular word. Suppose if it contains 'youtube', I want my column value as youtube. So I tried the following,</p>
  
  <pre><code>data['test'] = 'other'
  </code></pre>
  
  <p>so once we do that we have,</p>
  
  <pre><code>data['test']
  other
  other
  other
  other
  </code></pre>
  
  <p>then I tried this,</p>
  
  <pre><code>data[data['URL'].str.contains("youtub") == True]['test'] = 'Youtube'
  data[data['URL'].str.contains("face") == True]['test'] = 'Facebook'
  </code></pre>
  
  <p>Though this runs without any error, the value of the test column, doesn't change. It still has other only for all the columns. When I run this statement, ideally 3rd row alone show change to 'Youtube' and 4th to 'Facebook'. But it doesn't change. Can anybody tell me what mistake I am doing here?</p>