Python - Return rows after a certain date where a condition is met,df.groupby('deviceid').apply(after_purchase)