title: Python stemming (with pandas dataframe)
body: <p>I created a dataframe with sentences to be stemmed.
  I would like to use a Snowballstemmer to obtain higher accuracy with my classification algorithm. How can I achieve this?</p>
  <pre><code>import pandas as pd
  from nltk.stem.snowball import SnowballStemmer
  
  # Use English stemmer.
  stemmer = SnowballStemmer(&quot;english&quot;)
  
  # Sentences to be stemmed.
  data = [&quot;programmers program with programming languages&quot;, &quot;my code is working so there must be a bug in the interpreter&quot;] 
      
  # Create the Pandas dataFrame.
  df = pd.DataFrame(data, columns = ['unstemmed']) 
  
  # Split the sentences to lists of words.
  df['unstemmed'] = df['unstemmed'].str.split()
  
  # Make sure we see the full column.
  pd.set_option('display.max_colwidth', -1)
  
  # Print dataframe.
  df 
  
  +----+---------------------------------------------------------------+
  |    | unstemmed                                                     |
  |----+---------------------------------------------------------------|
  |  0 | ['programmers', 'program', 'with', 'programming', 'languages']|
  |  1 | ['my', 'code', 'is', 'working', 'so', 'there', 'must',        |  
  |    |  'be', 'a', 'bug', 'in', 'the', 'interpreter']                |
  +----+---------------------------------------------------------------+
  </code></pre>