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