Given an orders DataFrame with customer_id and amount_usd, compute for each row its percentage of that customer's total spend, rounded to 1 decimal. The result must stay at row grain (one value per input row, in order) — not collapsed to one row per customer. Rows for the same customer need not be adjacent.
If a customer's total is 0, each of their rows gets None (the share is undefined). Return the percentages as a Python list, in row order.
What the tests check
3 on Run · 4 on Submit01each row's share of its customer total, row grain preserved
02returns one value per input row
03interleaved customers keep input row order
Submit runs these and one more check you don’t see, so code written for the visible tests alone can still miss.