Good morning guys. So my problem is to remove duplicates from dataframe caused by many diffrent values in one of columns.
The base dataframe looks like this below:
As You can see, I have duplicated values in columns Name and Id depends on Category. Our goal is to remove those duplicates while keeping the information about category.
I would like to have the exact view as here below:
I have tried to use get_dummies method from pandas library but i have some issues.
dummies = pd.get_dummies(df[['Category']], drop_first=True)
df = pd.concat([df.drop(['Category'], axis=1), dummies], axis=1)
Using the code above i'm getting the result like this below:
The result is basicly still the same as base dataframe.
Do You guys have any idea how to deal with it?