Advertisement
KillianMills

remove_dups.py

Oct 18th, 2016
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. import pandas as pd
  2.  
  3. filename = "enter your filename here"
  4. new_filename = ""
  5.  
  6. tmp = pd.read_csv(filename)
  7. print tmp.drop_duplicates('Prefix')
  8. print tmp
  9.  
  10. tmp = tmp.drop_duplicates('Prefix')
  11. tmp.to_csv(filename)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement