I am trying to go through a list of comments collected on a pandas dataframe and tokenize those words and put those words in a new column in the dataframe but I have having an e
Don't you just want to do this:
df['words'] = df['complaint'].apply(apwords)
you don't need to define the function addwords. Which should be defined as:
addwords
addwords = lambda x: apwords(x)