I have a pandas dataframe and wish to remove rows based on whether either entries of 2 particular columns are duplicate or not, starting from the first row and proceeding downwards (keeping the first hit and removing the other duplicates).
For example starting from:
| Group_1 | Group_2 | Score |
|---|---|---|
| Red | Blue | 90 |
| Red | Orange | 85 |
| Red | Violet | 82 |
| Green | Blue | 79 |
| Green | Yellow | 74 |
And having an output where all entries are unique (considering both columns simultaneously - the fourth row is removed because "Blue" in the second column is already present in the first row):
| Group_1 | Group_2 | Score |
|---|---|---|
| Red | Blue | 90 |
| Green | Yellow | 74 |