Python practice: Capstone Business Analytics Case Study
Chapter 32 · 8 questions · included in full access
Question 1 · easy
Structuring an enterprise analytics pipeline
Solve it in your browserIn an end-to-end data pipeline, in which sequence should an analyst execute data processing operations?
Question 2 · easy
Capstone Step 1: Multi-source ingestion & hygiene
Solve it in your browserLoad
"orders_messy.csv". Drop duplicate rows using.drop_duplicates().copy(). Fill missing values in"Units"with the median of"Units"using.fillna(). Print the sum of"Units"in the cleaned DataFrame (int(clean["Units"].sum())):Question 3 · medium
Capstone Step 2: String normalization & standardization
Solve it in your browserLoad
"orders_messy.csv". Drop duplicates. Normalize the"Customer"column by stripping whitespace and converting to title case using.str.strip().str.title(). Print the customer name at index 0 (clean["Customer"].iloc[0]):Question 4 · medium
Capstone Step 3: Relational enrichment with reps master
Solve it in your browserLoad
"sales.csv"and"reps.csv". Left join on["Rep", "Region"]. Print the count of rows in the enriched dataset (len(enriched)):Question 5 · medium
Capstone Step 4: Engineer gross margin metric
Solve it in your browserLoad
"sales.csv". Engineer a featuresales["Margin"] = sales["Revenue"] * 0.3(representing a 30% gross profit margin). Print the sum of"Margin"across all orders as an integer (int(sales["Margin"].sum())):Question 6 · medium
Capstone Step 5: Monthly cohort aggregation report
Solve it in your browserLoad
"sales.csv". ParseDateas datetime. Group by month (sales["Date"].dt.month) and use.agg()to computerevenue=("Revenue", "sum")andorders=("OrderID", "count"). Print the total revenue for Month 1 as an integer (int(monthly.loc[1, "revenue"])):Question 7 · hard
Capstone Step 6: Quota attainment leaderboard
Solve it in your browserLoad
"sales.csv"and"reps.csv". Left join on["Rep", "Region"]. Aggregate total revenue by Rep and Target:rep_totals = enriched.groupby(["Rep", "Target"])["Revenue"].sum().reset_index(). Computerep_totals["Attainment"] = (rep_totals["Revenue"] / rep_totals["Target"]) * 100. Sort descending and print the top attainment rep name (top_rep = rep_totals.sort_values("Attainment", ascending=False).iloc[0]["Rep"]):Question 8 · hard
Capstone Step 7: Master executive KPI dashboard table
Solve it in your browserLoad
"sales.csv". Create a master regional executive summary:summary = sales.groupby("Region").agg(orders=("OrderID", "count"), total_rev=("Revenue", "sum"), avg_units=("Units", "mean")).reset_index(). Print the shape of the summary table as a tuple (summary.shape):
These questions are part of full access.
The first chapters of every track are free. Full access is a one-time payment.
See pricing