Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). #1

Open
Rahulvks opened this issue Mar 31, 2018 · 0 comments

Comments

@Rahulvks
Copy link

Hi when i run this piece of code am getting below error

`for index, review in data['Text'].iteritems():

#Pass a single review to TA (one by one):
json_output = tone_analyzer.tone(data, content_type='text/plain')    

#Traverse the heirarchy of result
for i in json_output['document_tone']['tone_categories']:
    for j in i['tones']:
        #Append the attributes to the data
        data.set_value(index, j['tone_name'], j['score'])

`
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant