title: Using the 'in' Operator in Python | Observation Specific vs Columns
body: <p>If the following code works and equates to 'True':</p>
  <pre><code>'1234567' in '1234567:AMC'
  </code></pre>
  <p>Why won't it work in the following arrays/data-frames/columns?</p>
  <pre><code>import pandas as pd
  
  x = {'Non-Suffix' : ['1234567', '1234568', '1234569', '1234554'], 'Suffix' : ['1234567:C', '1234568:VXCF', '1234569-01', '1234554-01:XC']}
  x = pd.DataFrame(x)
  x
  
  
  x['Non-Suffix'] in x['Suffix']
  # Note: Above line provides error (see below SO screen shot for full error)
  </code></pre>
  <p>Below is the error message I get:</p>
  <p><a href="https://i.stack.imgur.com/3AMfJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3AMfJ.png" alt="Error Message" /></a></p>
  <p>Is there a way be able to apply the '1234567' in '1234567:AMC' logic to columns of data?</p>