SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #delete rows with minus frases
  2. minus = 'Продам,продам,руб,рублей'
  3. minusFrase = minus.split(',')
  4. correct_comments=[]
  5. for index, row in df1.iterrows():
  6.     i = 0
  7.     for minus_word in minusFrase:
  8.         if minus_word in row['text']:
  9.             i = i + 1
  10.             if i < 0:
  11.                 correct_comments.append((row['date'],row['text'],row['mark']))
  12. print(correct_comments)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top