i have a data frame with a col which has text. I want to apply textblob and calculate sentiment value for each row.
text sentiment
this is great
great movie
great story
When i execute the below code:
df['sentiment'] = list(map(lambda tweet: TextBlob(tweet), df['text']))
I get the error:
TypeError: The `text` argument passed to `__init__(text)` must be a string, not <class 'float'>
How do you apply textBLob to each row of a col in a dataframe to get the sentiment value?