I have a dataframe
username score
1 0.0008
1 0.1
1 0.000009
2 0.2
2 0.0098
2 0.7
3 0.99
3 0.019
3 0.0001
I need to filter using that condition
d = {1: 0.05, 2: 0.01, 3: 0.02}
So I need to extract all that less than value in dict for every client.
Desire output:
username score
1 0.0008
1 0.000009
2 0.0098
3 0.019
3 0.0001
How can I filter it fast? I know it's possible to do it using loops, but I have a huge dataset includes more than 100 usernames.