I am reading a csv into a dataFrame with the goal of filtering duplicate entries and storing their id's
csv:
Name,Hash,Id,Tag,Rarity,Tier,Type,Source,Archetype,Tertiary Stat,Tuning Stat
AION Adapter Bond,119770768,"""6917530158183792231""",,Legendary,5,Warlock Bond,kepler,Gunner,melee,melee
AION Adapter Bond,119770768,"""6917530158185263524""",,Legendary,5,Warlock Bond,kepler,Specialist,super,weapons
AION Adapter Bond,119770768,"""6917530158185267264""",,Legendary,5,Warlock Bond,kepler,Specialist,super,weapons
My code is as follows:
import pandas as pd
df = pd.read_csv("destiny-armor.csv", usecols=['Name','Id','Archetype','Tertiary Stat','Tuning Stat'])
df.drop_duplicates(subset=['Name','Archetype','Tertiary Stat','Tuning Stat'], inplace=True)
print(df)
Expectation:
Return a dataFrame 'df1' with rows where if the 'Name','Archetype','Tertiary Stat','Tuning Stat' are equal, they are removed
Issue:
If I change 'inplace' to False it returns the entire list and while 'inplace' is True it returns 'None'
I'd appreciate any incite on this behavior or a different method to achieve what I am after.