I am willing to filter the ids which have SMS and Phone in the type
column and whenever login_method
is equal to resend
df
id type login_method
1 SMS resend
1 SMS complete
2 phone resend
2 SMS resend
2 SMS start
3 phone resend
3 phone start
3 phone complete
3 SMS nice
expected result
df
id type login_method
1 SMS resend
1 SMS complete
3 phone resend
3 phone start
3 phone complete
3 SMS nice
In this case only id 2 have phone and SMS in the login method equal to resend