Unexpected result in Power Bi Sentiment Analysis

When I try to run the below script on a power bi data set

import pandas as pd 
from nltk.sentiment.vader import SentimentIntensityAnalyzer 
sia=SentimentIntensityAnalyzer() 
dataset['polairty scores'] =dataset['Column1'].apply(lambda x: sia.polarity_scores(x)['compound'])

I get the attached image as a result

Result table

I expect to see this table

source table

with a new column that has a score in each row

  • What happens when you click the two split arrows in the top right of the Value column header?

    – 

  • it gives me the option to select one of three items Column1 column2 or polarity scores all 3 is selected but if I select only 1 the table displays the same

    – 

  • Select all columns – you are wanting it to expand the table in the column.

    – 

  • still gives the same result

    – 

  • Not sure what “same results” means. Click on the actual cell that has Table in green, then at the bottom, a data preview should show what this table looks like. Share a screen grab of that.

    – 

Leave a Comment