title: How to create a column in a Pandas dataframe based on a conditional substring search of one or more OTHER columns
body: <p>I have the following data frame:</p>
  <pre><code>import pandas as pd
  
  df = pd.DataFrame({'Manufacturer':['Allen Edmonds', 'Louis Vuitton 23', 'Louis Vuitton 8', 'Gulfstream', 'Bombardier', '23 - Louis Vuitton', 'Louis Vuitton 20'],
                     'System':['None', 'None', '14 Platinum', 'Gold', 'None', 'Platinum 905', 'None']
                    })
  </code></pre>
  <p>I would like to create another column in the data frame named <code>Pricing</code>, which contains the value &quot;East Coast&quot; if the following conditions hold:</p>
  <p>a) if a <strong>substring</strong> in the <code>Manufacturer</code> column matches &quot;Louis&quot;,</p>
  <p>AND</p>
  <p>b) if a <strong>substring</strong> in the <code>System</code> column matches &quot;Platinum&quot;</p>
  <p>The following code operates on a single column:</p>
  <pre><code>df['Pricing'] = np.where(df['Manufacturer'].str.contains('Louis'), 'East Coast', 'None')
  </code></pre>
  <p>I tried to chain this together using AND:</p>
  <pre><code>df['Pricing'] = np.where(df['Manufacturer'].str.contains('Louis'), 'East Coast', 'None') and np.where(df['Manufacturer'].str.contains('Platimum'), 'East Coast', 'None')
  </code></pre>
  <p>But, I get the following error:</p>
  <pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use `a.any()` or `a.all()`
  </code></pre>
  <p>Can anyone help with how I would implement <code>a.any()</code> or <code>a.all()</code> given the two conditions &quot;a&quot; and &quot;b&quot; above?  Or, perhaps there is a more efficient way to create this column without using <code>np.where</code>?</p>
  <p>Thanks in advance!</p>