Identify repeated headers in extracted tables

10 October 2026

Newspapers with different headlines and column layouts are spread across a surface.
Illustrative photograph. Cropped and resized. Photo by Moussa Idrissi on Pexels. · Pexels License

Remove a row as a repeated header only when its cells and position match the header on the source page. Never drop a row merely because one cell says “Total”, “Amount” or “Quantity”. Those words can be legitimate product names or descriptions.

Classify the interruption before cleaning it

Suppose a budget spans two pages. Halfway through the extracted text, the row “Item | Quantity | Unit price | Amount” appears again. Inspect the second page. If that exact sequence appears as the column headings above the detail, mark the extracted row as a repeated header. Preserve the original extraction, its page number and the reason the row was excluded from the clean table.

Now consider a line whose cells read “Total | 2 | 15.00 | 30.00”, where Total is the supplier's product name. The remaining columns carry plausible quantity and price data. Check the visible row and the product reference before classifying it. A filter that drops any line containing “Total” would remove a real purchase. A heading spanning several columns may supply the group label for the rows beneath it without belonging to the data rows.

Reconcile each page with its own source

The raw extraction and normalised data table provide a separate worked example. The raw output contains column headings and the section label Region B. The normalised file retains the four A items and four B items, carrying Region B as a group label rather than a purchased item.

Record raw row count, repeated headers, other structural rows, retained data rows and unresolved rows for each page. Check the identity of the retained rows as well as their number. If a suspected header has missing cells or sits midway through detail, keep it in a review queue until someone can inspect the source. A tidy dataset is useful only when its real line items survive.

Part of the How to catch wrong cells in a PDF table with the right total guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).