Created
February 21, 2018 04:35
-
-
Save lucasmelin/65fed8210032b9c29edc75ff94a1fc19 to your computer and use it in GitHub Desktop.
Python script to extract unique rows from a csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open('input.csv','r') as in_file, open ('output.csv','w') as out_file: | |
seen = set() | |
for line in in_file: | |
if line in seen: continue | |
seen.add(line) | |
out_file.write(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment