rxxnzz commited on
Commit
33d4607
1 Parent(s): 9734d4d

Update tubes.py

Browse files
Files changed (1) hide show
  1. tubes.py +1 -1
tubes.py CHANGED
@@ -56,7 +56,7 @@ data['complete_review']= data['complete_review'].apply(lemmatize_text)
56
  words_to_remove = ['chatgpt','app','chatgpts','chat','gpt','iphone','ipad','gpt4','phone','number','ai','use','io']
57
  data['complete_review'] = data['complete_review'].apply(lambda x: " ".join(x for x in x.split() if x not in words_to_remove))
58
 
59
- data['sentiment'] = data['rating'].apply(lambda rating: 1 if rating > 3 else 0)
60
 
61
  data['sentiment'].value_counts(normalize=True).mul(100).round(2)
62
 
 
56
  words_to_remove = ['chatgpt','app','chatgpts','chat','gpt','iphone','ipad','gpt4','phone','number','ai','use','io']
57
  data['complete_review'] = data['complete_review'].apply(lambda x: " ".join(x for x in x.split() if x not in words_to_remove))
58
 
59
+ data['sentiment'] = data['rating'].apply(lambda rating: 2 if rating > 3 else (1 if rating == 3 else 0))
60
 
61
  data['sentiment'].value_counts(normalize=True).mul(100).round(2)
62