title: How to do exact string match while filtering from pandas dataframe
body: <p>I have a dataframe as </p>
  
  <p>df</p>
  
  <pre><code>   indx   pids
      A    181718,
      B     31718,
      C      1718, 
      D    1235,3456
      E    890654,
  </code></pre>
  
  <p>I want to return a row that matches 1718 exactly.</p>
  
  <p>I tried to do this but as expected it returns rows where the 1718 is subset as well: </p>
  
  <p><code>group_df = df.loc[df['pids'].astype(str).str.contains('{},'.format(1718)), 'pids']</code></p>
  
  <pre><code>   indx   pids
      A    181718,
      B     31718,
      C      1718, 
  </code></pre>
  
  <p>When I try to do something like this, it returns empty: </p>
  
  <pre><code>cham_geom = df.loc[df['pids'] == '1718', 'pids']
  </code></pre>
  
  <p>Expected output: </p>
  
  <pre><code> indx   pids
    C      1718, 
  </code></pre>
  
  <p>Can anyone help me with it?</p>