I have a pandas data frame like below.
name type loc
abc cew hyd
abc cew mum
bcd tes kkr
ced fge abe
ced fge abe
Now I want to create two data frames first drop all duplicates and then create data frames
1st df (contains rows for columns where name and type are same)
name type loc
abc cew hyd
abc cew mum
2nd df (contains rows for columns where name and type are different)
name type loc
bcd tes kkr
ced fge abe
I am able to drop the duplicates like below
df = df1.drop_duplicates(subset='name', keep='first')
But from here I have not able to proceed further. Answers with explanation will be helpful