title: I have a text column in pandas, and i have a list containing some words.I need to match the text in each row with the word in list and keep them
body: <p>I have the column <code>train['final_input_text']</code> containing  text values. I have a set of words in a list, which i need to match with 
  <code>train['final_input_text'].values</code>, if it matches keep the words in <code>train['final_input_text']</code>.</p>
  
  <pre><code>train['final_input_text'].values[1] = 'students would rather school home sometimes high poverty'
  </code></pre>
  
  <p>I tried using loops , but was unable to arrive</p>
  
  <pre><code>text_df=train['final_input_text'].values
  </code></pre>
  
  <p>I need to keep only those words in <code>train[final_input_text]</code> which matches the words in my list, which has ~9k words.</p>