def calculate_sentiment(self):
    print('Begin to calculate sentiment...')
    self.mood_data_df.content = self.mood_data_df.content.apply((lambda x: str(x).replace('\n', '')))
    self.mood_data_df.content = self.mood_data_df.content.apply((lambda x: str(x).replace(' ', '')))
    self.mood_data_df.content = self.mood_data_df.content.apply((lambda x: remove_waste_emoji(str(x))))
    self.mood_data_df['sentiments'] = (- 1)
    for i in range(self.mood_data_df.shape[0]):
        content = self.mood_data_df.loc[(i, 'content')]
        sentiment = self.sc.get_sentiment_for_text(content)
        print('content:', content, 'senti:', sentiment)
        self.mood_data_df.loc[(i, 'sentiments')] = sentiment
    self.mood_data_df = self.re_do_sentiment(self.mood_data_df)
    try:
        self.mood_data_df.drop(['Unnamed: 0'], axis=1, inplace=True)
    except BaseException as e:
        print(e)
    self.mood_data_df.to_csv('after_sentiment.csv')
    print('text sentiment:', self.mood_data_df.shape)
def calculate_sentiment(self):
    print('Begin to calculate sentiment...')
    self.mood_data_df.content = self.mood_data_df.content.apply((lambda x: str(x).replace('\n', )))
    self.mood_data_df.content = self.mood_data_df.content.apply((lambda x: str(x).replace(' ', )))
    self.mood_data_df.content = self.mood_data_df.content.apply((lambda x: remove_waste_emoji(str(x))))
    self.mood_data_df['sentiments'] = (- 1)
    for i in range(self.mood_data_df.shape[0]):
        content = self.mood_data_df.loc[(i, 'content')]
        sentiment = self.sc.get_sentiment_for_text(content)
        print('content:', content, 'senti:', sentiment)
        self.mood_data_df.loc[(i, 'sentiments')] = sentiment
    self.mood_data_df = self.re_do_sentiment(self.mood_data_df)
    try:
        self.mood_data_df.drop(['Unnamed: 0'], axis=1, inplace=True)
    except BaseException as e:
        print(e)
    self.mood_data_df.to_csv('after_sentiment.csv')
    print('text sentiment:', self.mood_data_df.shape)