有没有人知道计算每天的平均情绪值?这是我的代码获取情绪分数,但我尝试计算每天的平均值,但我没有运气
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import pandas as pd
analyzer = SentimentIntensityAnalyzer()
eth = pd.read_csv("Ethereum_2020_2021_Time_Adjusted.csv")
eth['Sentiment Values'] = eth['Title'].apply(lambda Title: analyzer.polarity_scores(Title))
eth['Title Sentiment Score'] = eth['Sentiment Values'].apply(lambda score_dict: score_dict['compound'])