I need to find event names, date and value (of the column) which meet a condition from the below data using Pandas. I want to find the if any events processed value is less than it's own average value for that particular event.
The condition is for any event_name,
number_of_items_processed < avg(number_of_items_processed)
The output I am looking for is,
Use from this code:
df['m']=df.groupby(by=['event'])['number_of_processed'].transform('mean')
df=df[df.number_of_processed<df.m]