Advertisement
naren_paste

duplicate_

Apr 2nd, 2024
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | Source Code | 0 0
  1. # Step 1: Change Data Type of Reviews Column
  2. df['reviews'] = df['reviews'].astype(str)
  3.  
  4. # Step 2: Remove Duplicates
  5. df = df.drop_duplicates()
  6.  
  7. # Step 3: Drop Specific Rows
  8. value_to_drop = 'specific_value'
  9. df = df[df['reviews'] != value_to_drop]
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement