Back to problems

Analyze time-zoned events with pandas

Algorithm · Voleon · Hard

You are working with two relations describing product usage, available both as pandas DataFrames and as PostgreSQL tables. users — one row per account: user_id (int), signup_ts (ISO-8601 string in UTC), tz (IANA zone name such as 'America/Los_Angeles', 'Asia/Tokyo', 'UTC'), is_bot (bool), country (two-letter ISO code), plan ('free', 'pro', 'enterprise'). events — one row per logged event: event_id (int), user_id (int), ts (ISO-8601 string carrying an explicit offset, e.g.…

Checking your access…