I have df
ID url code
111 vk.com 1
111 twitter.com 1
222 facebook.com 1
222 vk.com 1
222 avito.ru 3
Desire output:
ID url code
111 vk.com 1
222 facebook.com 1
222 avito.ru 3
I need to delete string, if previous code is equal to this string and ID is equal to this string.