title: Create new pd.DataFrame column if value of existing column contains specific substring
body: <p>I have a DataFrame as below:</p>
  
  <pre><code>     entity   
  0     cat  
  1     dog
  2     tree
  3     dog
  4     flower
  </code></pre>
  
  <p>I want to create a new column called <code>type</code> which contains values based on a condition that a value in <code>entity</code> contains a substring</p>
  
  <pre><code>substring1 = 'cat|og'
  substring2 = 'ree|ower'
  </code></pre>
  
  <p>the resulting DataFrame should look like this:</p>
  
  <pre><code>    entity      type   
  0     cat      animal
  1     dog      animal
  2     tree     plant
  3     dog      animal
  4     flower   plant
  </code></pre>
  
  <p>The approach i'm taking it to take pd.Series.str.contains, and creating two boolean columns <code>is_animal</code> and <code>is_plant</code>.</p>
  
  <p>How can I modify the below code to eliminate the need for the two boolean columns and just have the <code>type</code> column?</p>
  
  <pre><code>df.loc[:, 'is_animal'] = df.entity.astype(str).str.contains(substring1, case=False)
  df.loc[:, 'is_plant'] = df.entity.astype(str).str.contains(substring2, case=False)
  </code></pre>
  
  <p>I have tried iterating over the DataFrame using <code>iteritems()</code> to create the <code>type</code> column,  but it does not seem to work.</p>