Created
March 19, 2015 17:48
-
-
Save danielrobertson/8d92a8a547dcc5d59155 to your computer and use it in GitHub Desktop.
Remove duplicates in CSV
This file contains hidden or 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
import pandas as pd | |
toclean = pd.read_csv('fileWithDuplicates.csv') | |
deduped = toclean.drop_duplicates('columnName') | |
deduped.to_csv('fileWithoutDuplicates.csv') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For xlsx files, use ssconvert to convert them to csv's first:
bash ssconvert myFile.xlsx myNewFile.csv