I am getting an error I cant seem to understand when im trying to plot a scatterplot below:
plt.figure(figsize=(8,6))
for i in range(0,df.shape[0]):
plt.scatter(df['polarity'][i], df['subjectivity'][i], color = 'Blue' )
plt.title('Sentiment Analysis')
plt.xlabel('Polarity')
plt.ylabel('Subjectivity')
plt.show()
Where my polarity and subjectivity cols are number values
I get
KeyError:3
----> 3 plt.scatter(df['polarity'][i], df['subjectivity'][i], color = 'Blue' )
not sure what I am missing here, any help appreciated, thanks!