edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

[DATA] issues with to_dataframe(include=dimensions=False) or converting XBRL data to balance_sheet

Open miruddfan opened this issue 11 months ago • 1 comments

Data Quality Issue Details

Issue Type:

  • [ ] Incorrect financial values (wrong numbers)
  • [ x] Missing financial data (expected data not present)
  • [ ] Calculation errors (formulas producing wrong results)
  • [ ] Data inconsistency (different values for same metric)
  • [ ] Historical data problems (changes over time)

Environment

EdgarTools Version: 5.6.2 Python Version: 3.10.19
Operating System: win 11

Financial Data Details

**Company/Ticker: APD ** Form Type: 10-K Filing Date/Period: 2025 Statement Type: Balance Sheet

Specific Metric/Concept:

  • Financial line item are missing:
  •       Long-Term Debt, 
    
  •       Long-Term Debt related party, 
    
  •       Noncontrolling interest
    

Data Issue

Expected Value:

  • Long-Term Debt = 16,769.9
  • Long-term debt related party = 177.5
  • Noncontrolling interest = 2,324.0
  • Treasury Stock Common Value is listed on APD balance sheet as negative, but edgartools reports a positive value
  • When include_dimensions = False, the Total Equity result is being overwritten by the Total Stockholder's Equity Should be 17,349.8 and not 15,024.9 (for the second instance)
  • Source: APD annual report, SEC edgar, Morningstar
  • Page/section reference: Page 71 of 10-K filing

Actual Value from EdgarTools:

Code to reproduce:

from edgar import Company

company_ticker = input("Enter company ticker (e.g., MSFT): ").upper()
#company_ticker = "MSFT"  # Example: Apple Inc.
company = Company(company_ticker)
financials = company.get_financials()
balance_sheet = financials.balance_sheet()
income_statement = financials.income_statement()
cash_flow = financials.cashflow_statement()
bs_df = balance_sheet.to_dataframe(include_dimensions=False,presentation=True)
is_df = income_statement.to_dataframe(include_dimensions=False,presentation=True)
cf_df = cash_flow.to_dataframe(include_dimensions=False,presentation=True)
## Cross-Verification
**Have you verified this issue with:**
- [x ] Multiple time periods for same company
- [ ] Multiple companies with same issue
- [ ] Direct SEC filing comparison
- [ ] Other financial data sources

**Affects multiple periods/companies?**
- Companies tested: APD
- Time periods tested: 2025-2024
- Pattern observed: 

## Expected Behavior
**What should happen:**
All lines on pg 71 reported in dataframe

**Data validation rules:**
- Should the value be positive/negative?
- Expected magnitude/range?
- Should it match specific calculations?

## Additional Context
- see bug 563

**Impact Assessment:**
- [ ] Minor (affects specific edge case)
- [x ] Moderate (affects common use cases)  
- [ ] Major (affects core financial calculations)
- [ ] Critical (produces completely wrong results)

---
*Data quality issues are high priority and will be verified against official SEC filings. Accuracy is fundamental to EdgarTools.*

miruddfan avatar Dec 29 '25 17:12 miruddfan

Fixed in Release 5.7.2

dgunning avatar Jan 02 '26 20:01 dgunning