I have a dataframe as seen below (w/ more columns but these are the only relevant columns)
order_id product_id purchase_value
1234. 23546.0. 50.
1234. 23546.0 20.
5678. 43244.0. 25.
I am trying to groupby order_id but only get orders where the purchase value for a specific product_id is a set amount.
Something like this: groupby[order_id] where [product_id] = 23546, and [purchase_value] = 50
I've tried
df = df[df['order_id'].eq('product_id').groupby(df['order_id']).transform('any')]
This works to filter on one column but I can't seem to figure out how to make this apply to multiple columns