title: Create new column if DataFrame contains specific string
body: <p>I have one <code>column</code> in the <code>DataFrame</code> that is a name. Inside this name there are patterns that I want to locate, and create a category in other <code>column</code> of same <code>DataFrame</code>. For example : </p>
  
  <pre><code>Name 
  
  name first RB LA a 
  name LB second
  RB name third
  name LB fourth 
  </code></pre>
  
  <p>I want the name with the same pattern to be in the same category, displayed in the other column </p>
  
  <p>What I want : </p>
  
  <pre><code>       Name                  Example          
  
  name first RB LA a          Round Blade category
  name LB second              Long Biased category
  RB name third               Round Blade category
  name LB fourth              Long Biased category
  </code></pre>
  
  <p>I have a <code>DataFrame</code>, not a list, there are several other columns in it. And there are not only two categories, but several ones. </p>
  
  <p>What I have Tried : </p>
  
  <pre><code>df.loc[df['Name']=="RB", 'Example'] = "RB category"
  </code></pre>
  
  <p>But it does not work since it must be an exact match </p>
  
  <p>Another attempt : </p>
  
  <pre><code>if df[['Name'].str.contains("RB")] : 
      (...)
  </code></pre>
  
  <p>But it gives me error : </p>
  
  <pre><code>ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
  </code></pre>
  
  <p>I tried to add to <code>.bool()</code> or <code>.any()</code>, but or the error persist or nothing happens when I run the line. </p>
  
  <p>Thank you. </p>