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
import pandas as pd | |
data = pd.read_csv("PokemonDb.csv") | |
uniqueNames = {} # dictionary | |
# Keeps only the first duplicate | |
for i, row in data.iterrows(): | |
if row["Name"] in uniqueNames: | |
data.drop(i, inplace=True) |
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
from collections import OrderedDict | |
# names in a column | |
names = ["Eevee", "Snorlax", "Eevee", "Jigglypuff", "Mew", "Mew"] | |
print(names) | |
unique = list(OrderedDict.fromkeys(names)) | |
print(unique) |
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
### Keybase proof | |
I hereby claim: | |
* I am felicious on github. | |
* I am meowsbun (https://keybase.io/meowsbun) on keybase. | |
* I have a public key ASDBwMfcxWP7XE2jIKEg9-emfJVfHXFb3pwlVf0CR-dJEwo | |
To claim this, I am signing this object: |