title: search string in pandas column
body: <p>I am trying to find a substring in below hard_skills_name column, like i want all rows which has 'Apple Products' as hard skill.</p>
  <p><a href="https://i.stack.imgur.com/NAeMb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NAeMb.png" alt="enter image description here" /></a></p>
  <p>I tried below code:</p>
  <pre><code>df.loc[df['hard_skills_name'].str.contains(&quot;Apple Products&quot;, case=False)]
  </code></pre>
  <p>but getting this error:</p>
  <pre><code>KeyError                                  Traceback (most recent call last)
  &lt;ipython-input-49-acdcdfbdfd3d&gt; in &lt;module&gt;
  ----&gt; 1 df.loc[df['hard_skills_name'].str.contains(&quot;Apple Products&quot;, case=False)]
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/core/indexing.py in __getitem__(self, key)
      877 
      878             maybe_callable = com.apply_if_callable(key, self.obj)
  --&gt; 879             return self._getitem_axis(maybe_callable, axis=axis)
      880 
      881     def _is_scalar_access(self, key: Tuple):
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis)
     1097                     raise ValueError(&quot;Cannot index with multidimensional key&quot;)
     1098 
  -&gt; 1099                 return self._getitem_iterable(key, axis=axis)
     1100 
     1101             # nested tuple slicing
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/core/indexing.py in _getitem_iterable(self, key, axis)
     1035 
     1036         # A collection of keys
  -&gt; 1037         keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False)
     1038         return self.obj._reindex_with_indexers(
     1039             {axis: [keyarr, indexer]}, copy=True, allow_dups=True
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/core/indexing.py in _get_listlike_indexer(self, key, axis, raise_missing)
     1252             keyarr, indexer, new_indexer = ax._reindex_non_unique(keyarr)
     1253 
  -&gt; 1254         self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing)
     1255         return keyarr, indexer
     1256 
  
  ~/anaconda3/envs/python3/lib/python3.6/site-packages/pandas/core/indexing.py in _validate_read_indexer(self, key, indexer, axis, raise_missing)
     1296             if missing == len(indexer):
     1297                 axis_name = self.obj._get_axis_name(axis)
  -&gt; 1298                 raise KeyError(f&quot;None of [{key}] are in the [{axis_name}]&quot;)
     1299 
     1300             # We (temporarily) allow for some missing keys with .loc, except in
  
  KeyError: &quot;None of [Float64Index([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n              nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n              nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n              nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n              nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n              nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n              nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,\n              nan, nan, nan, nan, nan, nan, nan, nan, nan],\n             dtype='float64')] are in the [index]&quot;
  </code></pre>