Hi, this is the vader model I have used for sentiment analysis, but I got an error

Viewed 15

Error:columns overlap but no suffix specified: Index(['Compound', 'positive', 'negative', 'neutral'], dtype='object')

scores = []
#declare variables for scores 
compound_list = [] 
positive_list = [] 
negative_list = [] 
neutral_list = [] 
for i in range(df['Comments'].shape[0]):
    
#print(analyzer.polarity_scores(sentiments_pd['Comments'][i])) 
compound = analyzer.polarity_scores(df['Comments'][i])["compound"] 
pos = analyzer.polarity_scores(df['Comments'][i])["pos"] 
neg = analyzer.polarity_scores(df['Comments'][i])["neg"] 
neu = analyzer.polarity_scores(df['Comments'][i])["neu"] 
scores.append({"Compound": compound, "positive": pos, "negative": neg, "neutral": neu}) 
    
sentiments_score = pd.DataFrame.from_dict(scores) 
df = df.join(sentiments_score) 

df.head()
0 Answers
Related