Skip to content

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

@Rahulvks

Description

@Rahulvks

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions