-1

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 ?

Yantra Logistics
  • 146
  • 4
  • 18
  • Does this answer your question? [Remove rows that two columns have the same values by pandas](https://stackoverflow.com/questions/43951558/remove-rows-that-two-columns-have-the-same-values-by-pandas) – Daquisu May 23 '22 at 14:40

0 Answers0