I have a pandas dataframe with three columns, A (Dates), B (Categorical Values), and C (Actual Values).
A | B | C
01-19 | 5 | 0.34
01-19 | 3 | 0.25
01-19 | 7 | 0.07
01-20 | 5 | 0.15
01-20 | 2 | 0.36
And so on.
What I want is to filter rows according to their dates and a specific threshold - something like:
[(01-19, x<6), (01-20, x<3)]
In which case that'd give me
A | B | C
01-19 | 5 | 0.34
01-19 | 3 | 0.25
01-20 | 2 | 0.36
My solution is to set up a multi index with A and B, but then I'm not entirely sure how to filter through the B's.