edgartools icon indicating copy to clipboard operation
edgartools copied to clipboard

[DATA] Is company.get_financials() pulling /formatting the information correctly - balance sheet (APD)

Open miruddfan opened this issue 11 months ago • 6 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 - 2024 Statement Type: Balance Sheet

Specific Metric/Concept:

  • Financial line item: Multiple lines in Balance sheet missing
  • XBRL concept name: (if known, e.g., "us-gaap:Revenues")

Data Issue

Expected Value:

  • Amount: (e.g., $394.3 billion)
  • Source: APD Annual Report, MorningStar, Edgar Filings
  • Page/section reference: Page 71 of 2025 10-K

Actual Value from EdgarTools:

  • There appears to be extra information (NEOM Hydrogen....) and missing information in balance sheet
  • Total long term and other items. My expectation is to reproduce (with maybe extra info) page 71 of the
  • 2025 10 k

Code to reproduce:

from edgar import Company
company_ticker = input("Enter company ticker (e.g., MSFT): ").upper()
company = Company(company_ticker)
financials = company.get_financials()
balance_sheet = financials.balance_sheet()

Cross-Verification

Have you verified this issue with:

  • [x ] Multiple time periods for same company
  • [ ] Multiple companies with same issue
  • [ x] Direct SEC filing comparison
  • [x ] Other financial data sources

Affects multiple periods/companies?

  • Companies tested: APD
  • Time periods tested: 2025-2024
  • Pattern observed:

Expected Behavior

What should happen: I expect to reproduce at minimum page 71 (which appears to be in Edgar) of the 2025 annual report. At least that was my expectation. Maybe I am off here?

Data validation rules:

  • Should the value be positive/negative?
  • Expected magnitude/range?
  • Should it match specific calculations?

Additional Context

  • https://investors.airproducts.com/static-files/9727101c-f017-4141-89c4-ab7c9d366a22
  • https://www.morningstar.com/stocks/xnys/apd/financials
  • https://www.sec.gov/ix?doc=/Archives/edgar/data/0000002969/000000296925000055/apd-20250930.htm#fact-identifier-905

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 28 '25 19:12 miruddfan

Thanks for reporting this @miruddfan! You've identified an important usability issue.

What's happening: The XBRL data includes "dimensional" breakdowns - segment data, VIE (Variable Interest Entity) details, geographic breakdowns, etc. By default, EdgarTools shows all of this alongside the main balance sheet line items, which clutters the output.

The fix: The include_dimensions parameter was already available on render() and to_dataframe(), but wasn't exposed consistently across the API. We've now made it available at all levels:

# Now you can set it when getting the statement
balance_sheet = financials.balance_sheet(include_dimensions=False)
print(balance_sheet)  # Clean 53-row output matching page 71

# Previously you had to do this
balance_sheet = financials.balance_sheet()
balance_sheet.render(include_dimensions=False)  # Still works

Coming in 5.7.0: We plan to make include_dimensions=False the default, so statements will be clean out of the box. Users who want dimensional breakdowns can opt-in with include_dimensions=True.

Regarding "missing" items like "Total Long-Term Debt" - that specific line item isn't on the face of the balance sheet in the XBRL presentation; it's in the debt schedule notes. The balance sheet shows "Long Term Debt" as a single line with "Total Non Current Liabilities" as the subtotal, which matches the SEC filing.

Will close this once the release is out. Let us know if you have questions!

dgunning avatar Dec 29 '25 12:12 dgunning

Great - I just tested and see the render(include_dimensions = False) improves the print statement. How do I get this version to be the one applicable to the to_dataframe(presentation=True) - so that my dataframe has a 'simplified' balance sheet? Should I be doing the same things with the other major documents (income statement, cashflow statement, etc.)? Do I need to wait for v 5.7?

miruddfan avatar Dec 29 '25 13:12 miruddfan

Good news - to_dataframe() already supports the include_dimensions parameter! This has been available since v4.31.0, so it works on all recent versions including the current release (5.6.4).

Workaround for current version:

from edgar import Company

company = Company('APD')
financials = company.get_financials()
balance_sheet = financials.balance_sheet()

# Clean dataframe without dimensional breakdowns
df = balance_sheet.to_dataframe(include_dimensions=False, presentation=True)

This reduces the APD balance sheet from 123 rows to 53 rows.

Yes, apply to all statements:

income_statement = financials.income_statement()
df_income = income_statement.to_dataframe(include_dimensions=False, presentation=True)

cash_flow = financials.cash_flow_statement()
df_cash = cash_flow.to_dataframe(include_dimensions=False, presentation=True)

In 5.7.0: include_dimensions=False will become the default, so you won't need to specify it.

dgunning avatar Dec 29 '25 14:12 dgunning

Thanks. I should have tried that.

Should I open another case for the following:

Using APD 2025 Balance sheet - there are 3 lines missing in the EdgarTools output that show on the balance sheet:

Long-Term Debt 16,769.9 Long-Term Debt related party 177.5 Noncontrolling interest 2,324.9

A line that is repeated (I think your tool is overwriting the Total Equity Line) Total Stockholder's Equity 15,024.9 (written twice)

The second time it should be Total Equity 17,349.8

Finally - the APD balance sheet shows Treasury Stock Common Value as a negative number, but your tool reports positive (I have presentation=True)

miruddfan avatar Dec 29 '25 16:12 miruddfan

Sure - open another issue

dgunning avatar Dec 29 '25 16:12 dgunning

The APD related issues have been fixed in 5.7.4 and 5.8.0

dgunning avatar Jan 04 '26 21:01 dgunning