no, that is not what you run. if you run just
in other words - we need to see how you populate the dflist. the problem is that your dflist does not have the same structure as data_all from the example you refer to.
for i in range(0, len(dflist)): call.append(dflist[i]['text']) vs_compound.append(analyzer.polarity_scores(dflist[i]['text'])['compound']) vs_pos.append(analyzer.polarity_scores(dflist[i]['text'])['pos']) vs_neu.append(analyzer.polarity_scores(dflist[i]['text'])['neu']) vs_neg.append(analyzer.polarity_scores(dflist[i]['text'])['neg'])what you get (of course) is
Error:Traceback (most recent call last):
File "C:\Users\BKolev\Desktop\foo.py", line 1, in <module>
for i in range(0, len(dflist)):
NameError: name 'dflist' is not defined
in other words - we need to see how you populate the dflist. the problem is that your dflist does not have the same structure as data_all from the example you refer to.