← Back to examples
📣 Marketing Attribution ROAS
Scenario: A growth team has campaign spend in spreadsheet-wide format and conversions in event format. Normalize the spend, join conversion facts, and compare return on ad spend across regions and channels.
Skills you'll use: melt, multi-column merge, KPI columns, groupby().agg(), pivotTableFull, and top-N selection.
1 · Normalize spend and join conversions
Turn wide channel spend into a tidy table, join conversion facts, and compute ROAS and cost per order.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
2 · Compare region/channel performance
Create a pivot-table scorecard and list the strongest daily placements.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent