In the dataframe
reference code
1001 TTaT
1002 TTaT
1002 TTaZ
1002 TTaX
1002 TTaT
I want to remove rows where for the same reference the code is duplicate.
expected output
reference code
1001 TTaT
1002 TTaT
1002 TTaZ
1002 TTaX
How do I do that ?