为什么我会收到“ AttributeError:'list'对象没有属性'encode'”?

时间:2020-10-19 03:14:54

标签: python tweepy sentiment-analysis

我正在运行此程序,原因是我试图对收集到的推文进行情感分析。

# Instantiate new SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()

# Generate sentiment scores
sentiment_scores = tweets['text_lemmatized'].apply(sid.polarity_scores)

但是我收到此错误消息。不知道为什么。

AttributeError: 'list' object has no attribute 'encode'

0 个答案:

没有答案