title: Search for words in Pandas Series using Python
body: <p>I am trying to search for words in string <code>account lock</code> in text encoded as Pandas Series. 
  Currently, I am using <code>contains</code> function. </p>
  
  <p>If text is <code>account lock email</code> I am getting correct results.</p>
  
  <pre><code>&gt;&gt;&gt; pd.Series('account lock email').str.contains('account lock', case=False)
  0    True
  dtype: bool
  </code></pre>
  
  <p>But if text is <code>lock email account</code> I am getting result <code>False</code>.</p>
  
  <pre><code>&gt;&gt;&gt; pd.Series('lock email account').str.contains('account lock', case=False)
  0    False
  dtype: bool
  </code></pre>
  
  <p>Also if text is <code>account email lock</code> I am getting result <code>False</code>.</p>
  
  <pre><code>&gt;&gt;&gt; pd.Series('account email lock').str.contains('account lock', case=False)
  0    False
  dtype: bool
  </code></pre>
  
  <p>Is there any way that <code>contains</code> function can be used to check if all words in a specified string are present in Pandas Series? </p>
  
  <p>Or is there any alternative?</p>
  
  <p>Got required results using below code using all function</p>
  
  <pre><code>&gt;&gt;&gt; all(x in ('lock email account').split() for x in ('account lock').split())
  True
  &gt;&gt;&gt; all(x in ('account email lock').split() for x in ('account lock').split())
  True
  &gt;&gt;&gt; all(x in ('account email').split() for x in ('account lock').split())
  False
  </code></pre>