0

I need a max of 3 link (results) from a single domain_name & need to discard other. I have tried doing with panda groupbuy but didn't get success. Thank you enter image description here

1 Answers1

0

df.groupby('domain_name').head(3) should do the trick.

(see Pandas get topmost n records within each group)