title: Select rows from dataframe based on substring A or B in a column
body: <p>Sorry, I needed to edit my question as I'm actually looking for substrings with more than one character. The suggested answers are good, but mostly work for one character strings.</p>
  
  <pre><code>import panda as pd
  
  test = pd.DataFrame({'A': 'ju1 j4 abjul boy noc s1 asep'.split(),
                   'B': [1, 2, 3, 4, 5, 6, 7]})
  print(test)
  
  
         A  B
  0    ju1  1
  1     j4  2
  2  abjul  3
  3    boy  4
  4    noc  5
  5     s1  6
  6   asep  7
  </code></pre>
  
  <p>I know I can select all the rows that contain 'ju' with</p>
  
  <pre><code>subset = test[test['A'].str.contains('ju')]
  print(subset)
  
         A  B
  0    ju1  1
  1  abjul  3
  </code></pre>
  
  <p>Is there an elegant way to select all rows that contain either 'ju' or 'as'?</p>
  
  <p>This works as suggested below, are there other ways that also work?</p>
  
  <pre><code>ju = test.A.str.contains('ju')
  as = test.A.str.contains('as')
  subset = test[ju | as]
  </code></pre>