Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please help :)
#6
no, that is not what you run. if you run just
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.
Reply


Messages In This Thread
Please help :) - by crystalteoh92 - Oct-09-2017, 03:54 AM
RE: Please help :) - by buran - Oct-09-2017, 06:31 AM
RE: Please help :) - by crystalteoh92 - Oct-09-2017, 07:06 AM
RE: Please help :) - by buran - Oct-09-2017, 07:13 AM
RE: Please help :) - by crystalteoh92 - Oct-09-2017, 08:13 AM
RE: Please help :) - by buran - Oct-09-2017, 08:23 AM
RE: Please help :) - by crystalteoh92 - Oct-09-2017, 08:43 AM
RE: Please help :) - by buran - Oct-09-2017, 08:59 AM
RE: Please help :) - by crystalteoh92 - Oct-09-2017, 09:20 AM
RE: Please help :) - by buran - Oct-09-2017, 10:10 AM
RE: Please help :) - by snippsat - Oct-09-2017, 11:49 AM
RE: Please help :) - by buran - Oct-09-2017, 02:00 PM
RE: Please help :) - by crystalteoh92 - Oct-10-2017, 01:04 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020