title: How to extract all string matches from a column using a input corpus/list in pandas?
body: <p>For example I have the below list of strings as input corpus (actually its a big list with 100 values).
  action=['jump','fly','run','swim']</p>
  
  <p>Data contains a column called action_description. How can I extract all the string matches in the action_description using action list as input corpus? </p>
  
  <p>Note: I have already done lemmitization description_action, so if the column have words like jumping or jumped its already converted to jump.</p>
  
  <p><strong><em>Sample input &amp; output</em></strong></p>
  
  <pre><code>"I love to run and while my friend prefer to swim" --&gt; "run swim"
  "Allan excels at high jump but he is not a good at running" --&gt; "jump run"
  </code></pre>
  
  <p>Note: I found the below pandas function but its not well documentated so couldnt figure out how to use it. </p>
  
  <p><a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.extractall.html" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.str.extractall.html</a></p>
  
  <p>Please recommend a optimal solution since by input dataframe have 200K rows.</p>
  
  <p>EDIT
  Words like jumper &amp; runway should be ignore by the algorithm i.e. should not be classified as jump &amp; run.</p>