NameError: name 'sent_df' is not defined

19 views Asked by At

how to solve this? can someone help me to solve this please, im beginner in here enter image description here help me to solve this problem, i dont know how to solve this and i cant understand what people post about name error and how to solve it. please help me and teach me. so i can understand about that problem, thank you.

%%time sentiment_analyzer = SentimentIntensityAnalyzer() for indx, row in sent_df.T.iteritems(): try: sentence_i = unicodedata.normalize('NFKD', sent_df.loc[indx, 'Tweet']) sentence_sentiment = sentiment_analyzer.polarity_scores(sentence_i) sent_df.at[indx, 'sentiment_score'] = sentence_sentiment['compound'] sent_df.at[indx, 'Negative'] = sentence_sentiment['neg'] sent_df.at[indx, 'Neutral'] = sentence_sentiment['neu'] sent_df.at[indx, 'Positive'] = sentence_sentiment['pos'] except TypeError: print (sent_df.loc[indexx, 'Tweet']) print (indx) break

0

There are 0 answers