Group, aggregate, tidy up. It is the shape of most of the Pandas you will ever write, and the tidying-up step is the one people skip.
Write average_order_value(df).
df has columns customer_id and amount, one row per order. Return a DataFrame with columns customer_id and avg_amount, one row per customer, holding that customer's mean order amount.
You have read the opening. The rest is free with a Bezen account, and no card is needed.
Behind the sign-in