Repository navigation
Description
Feature Category
- New API functionality
- Performance improvement
- Developer experience improvement
- Documentation enhancement
- Tool/utility addition
Problem Statement
Is your feature request related to a problem? Please describe.
HTML-table Markdown can look complete even when the filed header spans leave amount columns without period coverage. Please expose that structural limitation for callers reviewing financial tables.
JPMorgan's Q2 2026 10-Q, accession 0001628280-26-054343, has this shape in its non-GAAP FTE reconciliation (Document.tables[24], zero-based). Its period/year rows span 42 grid columns, while the leaf and amount rows span 45. No rowspans fill the gap. The parser retains the filed spans correctly.
The 2026 cell covers zero-based grid columns 3–20, but managed-basis Other income of $8,113 million is at column 22. The 2025 cell covers columns 24–41, but $1,817 million is at column 43. Literal span projection therefore supplies no year at either amount. This is a source-coverage limitation, not a request to guess missing years.
Who would benefit from this feature?
- Beginner Python users working with SEC filings
- Financial analysts and researchers
- Advanced developers building financial applications
- Data scientists working with financial datasets
Proposed Solution
Describe the solution you'd like
Provide opt-in table diagnostics exposing incomplete or conflicting grouped-header coverage, with the affected source columns and original spans. Callers should be able to distinguish a complete header association from one requiring source review. Preserve the literal cells and amounts.
Describe alternatives you've considered
Inspecting the original filing manually works but gives applications no diagnostic. Automatically stretching or shifting group spans risks assigning an incorrect year. Comparing raw colspan sums alone is insufficient: carried rowspans can legitimately complete a row.
Use Case Example
How would you use this feature?
Save the linked filing as jpm-20260630.htm. The code then uses that local file without further network requests:
from pathlib import Path
from edgar.documents import HTMLParser, ParserConfig
source = Path("jpm-20260630.htm").read_text(encoding="utf-8")
document = HTMLParser(ParserConfig()).parse(source)
table = document.tables[24] # zero-based non-GAAP FTE reconciliation
print([sum(cell.colspan for cell in row) for row in table.headers])
# [42, 42, 45]
print(document.to_markdown())
# Requested addition: diagnostics about uncovered group positions,
# alongside the existing output, rather than an inferred year repair.Implementation Considerations
Complexity Level:
- Simple (minor API addition)
- Moderate (new functionality with existing patterns)
- Complex (significant architectural changes)
Backwards Compatibility:
- This feature maintains backwards compatibility
- This feature might break existing code (please explain below)
- Unsure about compatibility impact
An opt-in diagnostic can preserve existing rendering. Account for carried rowspans and intentional partial groups; do not warn merely because two row sums differ.
Additional Context
Measured on EdgarTools 5.61.1, main 7a2a157e34e0329b1a8428127dd6ab1b985813fe, Python 3.14.8, Linux. Scope: one company, one filing, one genuinely short group layout.
Related Issues/Features:
#1474 and #1480 preserve grouped-header paths. This proposal concerns source coverage and does not request expanding that fix. #1477 concerns classifying body values as headers. Targeted open/closed issue searches for header colspan, header rowspan, JPMorgan tables and header alignment found no separate coverage-diagnostic request.
Feature requests are evaluated based on EdgarTools' core principles: Simple yet powerful, accurate financials, beginner-friendly, and joyful UX.
Activity
synfonia-llc commentedon Oct 27, 2026
@dgunning, here is our current thinking on the root cause, proposed behavior, and coordination with other issues.
Root Cause:
HTML tables expose no diagnostic for incomplete grouped-header coverage, although the original spans can leave an amount without a covering year or duration label. The retained JPMorgan amounts remain intact; the gap is diagnostic visibility.
Proposed Behavior:
Add opt-in source-grid diagnostics for the evaluated initial header block, retaining observed paths, original spans and explicit gaps or ambiguity without changing default rendering. Report missing year coverage for JPMorgan's managed-basis Other income amounts of 8,113 and 1,817 million without inferring a year. Preserve the later six-month section and mark its body-cell associations
not_assessedrather than applying the initial three-month label. Distinguish carried rowspans and intentional partial grouping from malformed or unevaluated geometry.Coordination:
Keep #1487 as a separate feature PR, coordinating observed header roles with #1485/PR #1556, while preserving landed #1480 handling. #1477's body-fact classification and #1734's export-name allocation remain separate.
Below, please find the full design document. Please let me know your thoughts.
Brian
Attachment: design-public.md, Opt-in source-header coverage diagnostics — #1487.
AI assistance: Codex; GPT-6.1 Sol (High) performed source scouting, checked source geometry and rendered Markdown, and finalized this comment; GPT-6 Astra (Max) developed the architecture and initial draft, and a separate financial review checked the source associations and resolved the later six-month block's assessment limitation.
dgunning commentedon Nov 14, 2026
Thanks, Brian. I went back to the JPMorgan table before reading the design closely, and the gap is gone on 6.1.0. Your own #1847 fixed it.
The table is 45 columns wide in the HTML only because every body row carries an empty 3-column spacer cell with
display:none. A browser gives that cell no grid slot, so the visible table is 42 columns wide in every row, matching the header rows. #1904 (shipped in 6.1.0) taught the parser to skip those hidden spacers. On current main, with accession 0001628280-26-054343 anddocument.tables[24]:2026(columns 3–20)2025(columns 24–41)Both now line up with the right year, which the arithmetic you pointed to agrees with (7,549 + 564 and 1,154 + 663). The 42/42/45 widths in the issue came from 5.61.1, before that fix.
I also checked whether the shape shows up elsewhere. Across the 87 real filings in our test fixtures (12,964 tables), 192 tables have a grouping header row that ends before the last amount column. In the ones I spot-checked, the layout was intentional: Oracle's "Percent Change" columns outside "Year Ended May 31", Caterpillar's "Fair Value Levels" and "Reference" columns, Walmart's footnote-marker column after the values, and Amazon's "Weighted Average Life". The one exception was Netflix's exhibit index, where body rows are classified as headers, which is #1477's problem rather than coverage. I didn't find a case where an amount was missing its period, so a coverage diagnostic would mostly report legitimate layouts. That's a lot of new API to carry for that.
So I'm going to close this as resolved by #1847. If you find a table on 6.1 where a visible column truly has no period header, once hidden cells are accounted for, please open a new issue with the accession and table index, and I'll look at it with fresh eyes.