I have the following dataframe:
     reference | topcredit | currentbalance | creditlimit
  1      1      |    50     |       20       |      70
  2      1      |    30     |       28       |      50
  3      1      |    50     |       20       |      70
  4      1      |    81     |       32       |      100
  5      2      |    70     |        0       |      56
  6      2      |    50     |       20       |      70
  7      2      |   100     |        0       |      150
  8      3      |    85     |       85       |      95
  9      3      |    85     |       85       |      95
And so on...
I want to drop duplicates based on the 'reference' only those that have the same topcredit, currentbalance and creditlimit.
In the reference 1 I have two that have the same numbers in the three columns in line 1 and 3, but also in reference 2, line 6 I would like to keep 1 of reference 1 and also line 6 of reference 2. In reference 3 both lines have the same information too.
The expected output is:
 reference | topcredit | currentbalance | creditlimit
    1      |    50     |       20       |      70
    1      |    30     |       28       |      50
    1      |    81     |       32       |      100
    2      |    70     |       24       |      56
    2      |    50     |       20       |      70
    2      |   100     |       80       |      150
    3      |    85     |       85       |      95
I would apreciate the help, I've been searching how to do it for a while.