Advertisement
misingnoglic

delete_dups.py

Dec 12th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import csv
  2. symbols = set([])
  3. new_file = open("new_csv.csv",'w')
  4. x = open("GSE67980_readCounts_withsymbol.csv").read().splitlines()
  5. for line in x:
  6.     symbol = line.split(",")[1]
  7.     if symbol not in symbols:
  8.         new_file.write(line+"\n")
  9.         symbols.add(symbol)
  10. x.close()
  11. new_file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement