Why These 25?
Hand-curated for maximum interview ROI.
Every Window/Aggregation Pattern
groupby + agg with named outputs, groupby + transform to broadcast back, within-group .rank(), pd.qcut bucketing, .cumsum() running totals, .shift() previous-period diffs, and .rolling(7).mean() for moving averages. The complete pandas window surface — drilled, not glanced at.
Flat-Daily vs Per-Entity Rolling
The trap that bites real production analytics queries — when a 7-day rolling average should partition by user_id and when it shouldn’t. We drill it explicitly so you don’t learn it the hard way.
SQL-to-Pandas Mental Model
Each pattern is taught alongside its SQL equivalent — WINDOW PARTITION BY ... ORDER BY ↔ groupby().rolling() — so candidates fluent in one language pick up the other in days, not weeks.
Skill Coverage
How the 25 problems distribute across pandas topics.
FAQ
The first 5 problems (Stage 1) are completely free.
Stages 2-5 require a Premium subscription, which gives you access to all 1,500+ problems across 15 production-grade datasets.
Ready to Master Pandas?
Start with Stage 1 — graded instantly in your browser.
All company names, logos, and trademarks are the property of their respective owners. Their use is for identification purposes only and does not imply endorsement.
LDS Pandas Window & Aggregation 25 — 25 Curated Python Problems
A 5-stage progression through every pandas window/aggregation pattern — groupby with named aggregation, within-group rank, qcut quartile bucketing, IQR transforms, cumulative running totals, shift period-over-period, rolling 7-day means (both flat-daily and per-entity), and 2D pivot capstones. Twenty-five problems on 15 production-grade schemas — the pandas analog of SQL window functions, where naive solutions hit the for-loop trap.
Problems included in LDS Pandas Window & Aggregation 25
- Count Campaigns by Status
- Sessions by Status
- Total Billed Amount by Provider
- Average Driver Rating by City
- Total Revenue by Merchant
- Creative Asset Approval Summary
- Total Revenue by Property
- Claim Stats by Place of Service and Network
- Trip Stats by City and Service Level
- Portfolio Holdings Summary
- Rank Users by Post Count
- Rank Listings by Price Within City
- Trade Amount Quartile Bucketing
- Anomalous Transaction Detection (IQR)
- Message Activity Feature Engineering
- Running Total of Loan Payments
- Daily Revenue Change vs Previous Day
- 7-Day Moving Average Freight Cost
- 7-Day Rolling Average Usage per Org
- 7-Day Moving Average Order Value
- Pivot Tickets by Channel
- Pivot Order Counts by Cuisine and Fulfillment Type
- Pivot Rating Distribution by Genre
- Carrier Performance Feature Matrix
- Customer Feature Matrix