Auditing an information-preserving reshape

Mark Yourself Question

  1. Grab a piece of paper and try this problem yourself.
  2. When you're done, check the "I have answered this question" box below.
  3. View the solution and report whether you got it right or wrong.

A distribution manager receives this complete report for warehouse W06. Every expected Warehouse-Week-Carrier combination in the reporting period is present. Missing means a count has not been reported; both measurements are counts of boxes.


Warehouse

Week beginning

Carrier

Dispatched boxes

Late boxes

W06

5 October 2026

Road

40

2

W06

5 October 2026

Air

25

missing

W06

12 October 2026

Road

0

0

W06

12 October 2026

Air

31

1


The manager wants carrier columns side by side for each warehouse and week, retaining both measurements so that the source records can be reconstructed.


A colleague proposes using only Warehouse to identify output rows, using Carrier for column headings, and using Dispatched boxes for cell values. When several values target the same cell, the colleague keeps the first. The colleague also replaces missing entries with zero.


Explain the information losses in this proposal. Specify a corrected wide table, show its contents, and describe checks that establish whether the reshape preserves the source information.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Merging Datasets Questions: