Back to problems

Transform and aggregate messy event data

Algorithm · Boston Consulting Group · Hard

You are handed three pandas DataFrames describing a subscription service together with its activity log. Solve everything with vectorized pandas only; iterating over rows in Python is not permitted. The subscribers frame stores one row per account and exposes the columns user_id, signup_date, plan, monthly_fee and country. Two activity frames carry the fields user_id, event_time, event_type and amount: in aug_events the fields appear in one order, while aug_events_more lists…

Checking your access…