title: Removing Rows that contain values in a list
body: <p>I am trying to filter out a large dataframe and don't want rows that contain certain values in the column 'Product Description'.</p>
  
  <p>I have looked at 
  <a href="https://stackoverflow.com/questions/21600219/how-can-i-remove-multiple-rows-with-different-labels-in-one-command-in-pandas/21600535#21600535">how can i remove multiple rows with different labels in one command in pandas?</a></p>
  
  <p>and </p>
  
  <p><a href="https://stackoverflow.com/questions/14057007/remove-rows-not-isinx">Remove rows not .isin(&#39;X&#39;)</a></p>
  
  <p>and applied the code. However,</p>
  
  <pre><code>  df[-df['label'].isin(List)] 
  </code></pre>
  
  <p>is not working for me and I am not sure what to do.</p>
  
  <p>Here is my exact code:</p>
  
  <pre><code>List2 = ['set up','setup','and install',....etc etc]
  </code></pre>
  
  <p>(I also tried List2 = ( ..etc ) with parentheses instead of brackets and it didn't work)</p>
  
  <pre><code>Computers_No_UNSPSC =Compters_No_UNSPSC[- Computers_No_UNSPSC['Product Description'].isin(List2)]
  </code></pre>
  
  <p>(I also tried using ~ instead of - which didn't work)</p>
  
  <p>Is there something that I am doing wrong/missing. When I look at my Computers_No_UNSPSC dataframe, I see that there are rows still containing words in the list I created. It doesn't seem to filter out what I don't want.</p>
  
  <p>Thanks for the help!</p>
  
  <p>**I believe the List2 is working. I have rows of data that where people are describe their computer purchases. I want all computers bought not 'computer repair' or 'computer software'.
  So I created a list that seems to capture peripherals/things I don't want...well when I say</p>
  
  <pre><code>print List2 
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>['set up', 'setup', 'and install', ' server', 'labor', 'services', 'processing', 'license', 'renewal', 'repair', 'case', 'speakers', 'cord', 'support', 'cart', 'docking station', 'components', 'accessories', 'software', ' membership', ' headsets ', ' keyboard', ' mouse', ' peripheral', ' part', ' charger', ' battery', ' drive', ' print', ' cable', ' supp', ' usb', ' shelf', 'disk', 'memory', 'studio', 'training', 'adapter', 'wiring', 'mirror']
  </code></pre>
  
  <p>Does this mean that it recognizes each string as a word? so when I apply the filter it will filter against each of the words in my List2?</p>
  
  <pre><code>A =A[-A['Product Description'].isin(List2)] 
  </code></pre>
  
  <p>This seems to be the part that isn't working but again, I am not sure where I went wrong.</p>