title: Removing nltk stopwords from csv DataFrame rows
body: <p>I'm attempting to remove stopwords from the following DataFrame read from a .csv. It's basically a long list of bigrams and the frequency of their occurence in a dataset of shampoo labels.</p>
  
  <p>The goal is to remove the whole row when a stopword appears in either column 'word1' or 'word2'.</p>
  
  <pre><code>                        word1                      word2  frequency
  0                       nicht                         in       3069
  1                        wenn                        sie       2729
  2                         von                    kindern       2108
  3                         die                      hände       2094
  4                        darf                      nicht       2091
  5                       hände                        von       2091
  6                      citric                       acid       2088
  7                     kindern                   gelangen       2082
  8                         sie                      einen       2053
  9                         mit                        den       2023
  10                       eine                   reaktion       1976
  </code></pre>
  
  <p>So far however, I've not even managed to delete a row based on only column 'word1' when it matches with a German stopword from nltk.</p>
  
  <p>The code I use is based on a previous question answered <a href="https://stackoverflow.com/questions/29523254/python-remove-stop-words-from-pandas-dataframe">here</a>.</p>
  
  <pre><code>import pandas as pd
  from nltk.corpus import stopwords
  
  stop = stopwords.words('german')
  
  df = pd.read_table("myfile.csv", sep=";")
  df.columns = ["word1","word2","frequency"]
  
  df["word1"] = df["word1"].apply(lambda x: ' '.join([word for word in x.split() if word not in (stop)]))
  
  print(df) 
  </code></pre>
  
  <p>The error I'm getting is:
  AttributeError: 'list' object has no attribute 'split'</p>
  
  <p>I totally understand that I'm at fault here for not understanding the called function. I'm trying to develop an understanding of pandas &amp; nltk while I'm doing a course on the side, but this isn't really going anywhere :)</p>
  
  <p>Once the DataFrame is cleaned of the stopwords, the goal is to write it into a new CSV. But that's for a later stage.</p>
  
  <p>EDIT: title change for clarification</p>