I have the following data,
name marks team1 team2
John 30 kk vv.
Sera 56 gg ww.
Saara 66 dd gg.
Dirg 33 rr dd.
maget 34 ff rr.
fared 56 vv ff.
juile 32 ww kk.
I need to have general formula to get records row wise, which have 'kk' in team 1 and team 2 This is just a sample data, I have actual data which is more than 100k rows.
df[(df['team1']=='kk')&(df['team2']=='kk')]