Back to problems

Use pandas to aggregate, pivot, and label

Algorithm · Cvs Health · Medium

You are given two pandas DataFrames, users and orders, with the columns shown below. users: user_id, is_member, state, age orders: order_id, user_id, channel, amount, status Perform the following tasks. First merge orders with users using a left join on user_id, keeping every order row and attaching the matching user attributes. Reuse the resulting merged DataFrame across steps. Filter the merged table to rows where status is 'delivered'. Produce two aggregated tables: total…

Checking your access…