0

while defining get Analysis (score) in Sentiment Analysis using Jupyter notebook encountered Indentation Error.

def getAnalysis(score):
    
if score < 0:
      return 'Negative'

elif score == 0:
      return 'Neutral'

else:
          return 'Positive'
    
    df['Analysis'] = df['Polarity'].apply(getAnalysis)

# Show the dataframe
    df
Robert
  • 6,055
  • 26
  • 41
  • 54
Praveen S
  • 1
  • 2
  • 1
    Does this answer your question? [I'm getting an IndentationError. How do I fix it?](https://stackoverflow.com/questions/45621722/im-getting-an-indentationerror-how-do-i-fix-it) – Henry Ecker Jun 12 '21 at 18:54

0 Answers0