I tried searching for this but the closest I could come to was this. But it did not give me what I wanted. I want to drop all instances of duplicates in a dataframe. For example, if I have a data frame
Col1 Col2 Col3
Alice Girl April
Jean Boy Aug
Jean Boy Sept
I want to remove all duplicate based on Col1 and Col2 so that I get
Col1 Col2 Col3
Alice Girl April
Is there any way to do this?
Also if I have a large number of columns like so:
Col1 Col2 Col3 .... Col n
Alice Girl April .... Apple
Jean Boy Aug .... Orange
Jean Boy Sept .... Banana
How would I group by only Col1 and Col2 but still keep the remaining columns?
Thank You