text_html_output_1.png
from nltk.sentiment.vader import SentimentIntensityAnalyzer

from sklearn.utils import shuffle

import pandas as pd

data_file = '../input/Amazon_Unlocked_Mobile.csv'
data = pd.read_csv(data_file)

data_df = pd.DataFrame(data)

data_df = shuffle(data_df)

data_df = data_df.dropna()

corr_matrix = data_df.corr()
corr_matrix['Rating'].sort_values(ascending=False)

corr_matrix = data_df.corr()
corr_matrix['Price'].sort_values(ascending=False)

data_df = data_df.reset_index(drop=True)

from nltk.sentiment.vader import SentimentIntensityAnalyzer
def sentiment_value(paragraph):
    analyser = SentimentIntensityAnalyzer()
    result = analyser.polarity_scores(paragraph)
    score = result['compound']
    return round(score, 1)

sample = data_df['Reviews'][1231]
print(sample)
print('Sentiment: ')
print(sentiment_value(sample))