dgunning / edgartools

Python library for working with SEC Edgar
MIT License
324 stars 70 forks source link

filing financials: some facts are missing when converting income statement to dataframe #49

Closed ilias-ant closed 2 months ago

ilias-ant commented 2 months ago

Python version: 3.12.2 (main, Mar 12 2024, 08:01:18) [GCC 12.2.0] edgartools version: 2.21.0

Minimum Reproducible Example

from edgar import Company, set_identity

if __name__ == "__main__":
    set_identity("Ilias Antonopoulos (xxxxxxxxxx@gmail.com)")

    filings = Company("AAPL").get_filings(form="10-K", filing_date="2023-01-01:2023-12-31")

    filing = filings.get(0).obj()

    print(filing.financials.income_statement)
    print(filing.financials.income_statement.to_dataframe())

I have noticed that, although the facts present in filing.financials.income_statement are correct, when compared with the corresponding income statement table from SEC, the facts:

are missing from the .to_dataframe() version of it (see screenshot below).

image
ilias-ant commented 2 months ago

Also, noticed a similar issue regarding the Common Stock fact of Nvidia's 2023 balance sheet:

from edgar import Company, set_identity

if __name__ == "__main__":
    set_identity("Ilias Antonopoulos (xxxxxxxxx@gmail.com)")

    filings = Company("NVDA").get_filings(form="10-K", filing_date="2023-01-01:2023-12-31")

    filing = filings.get(0).obj()

    print(filing.financials.balance_sheet)
    print(filing.financials.balance_sheet.to_dataframe())
Screenshot 2024-05-05 at 11 38 11 PM
dgunning commented 2 months ago

Fixed in 2.21.1