Skip to main content

Sales Report Pipeline

Challenge on lesson: Checkpoint: Data Processing Pipeline

Implement report(sales) where sales is a list of dicts with keys 'region' (str) and 'amount' (int, may be negative for refunds). Return a dict mapping region to total amount, but ONLY include regions with a positive total. Also implement is_valid(sale) returning True only for dicts with str region and int amount (no bools).

Difficulty: intermediate

Back to lesson: Checkpoint: Data Processing Pipeline