-
-
Notifications
You must be signed in to change notification settings - Fork 311
Description
Issue Type
- [x ] Data Quality Issue (incorrect financial values, missing data)
- [x ] XBRL Parsing Issue (statement rendering, concept mapping)
- Filing Access Issue (download failures, attachment problems)
- Performance Issue (slow operations, memory problems)
- Compatibility Issue (platform/dependency conflicts)
- Documentation Issue (unclear instructions, missing examples)
Environment
EdgarTools Version:15.4.0
Python Version:3.10.19
Operating System:Win 11
Bug Description
Multiple errors with DIS stitching
What actually happened:
Missing Cost of Products sold - missing (separate line item in DIS 10-k balance sheet
both of the 2025 numbers appear (maybe) to be overwritten
us-gaap_NetCashProvidedByUsedInOperatingActivitiesContinuingOperations
us-gaap_NetCashProvidedByUsedInFinancingActivitiesContinuingOperations
Anything pre-2025 seems to be down 1 line on the income statement
The issues seem to propagate
Error message (if any):
Paste any error messages here
Reproduction
Company/Ticker: (e.g., AAPL)
Time Period: (e.g., 2020-2023, Q4 2023)
Relevant Forms: (e.g., 10-K, 10-Q, 8-K)
Minimal code to reproduce:
# Paste the minimal code that reproduces the issue
from edgar import Company
company_ticker = input("Enter company ticker (e.g., MSFT): ").upper()
write_files = input("Do you want to save CSV files of the sheets? Y/N ").upper()
number_years = int(input("Enter the number(years) of annual reports desired = "))
data['company_ticker'] = company_ticker
company = Company(company_ticker)
filings = company.get_filings(form="10-K").head(number_years)
xbrls = XBRLS.from_filings(filings)
stitched_statements = xbrls.statements
income_statement = stitched_statements.income_statement()
balance_sheet = stitched_statements.balance_sheet()
cash_flow = stitched_statements.cashflow_statement()
bs_df = balance_sheet.to_dataframe()
is_df = income_statement.to_dataframe()
cf_df = cash_flow.to_dataframe()
df_map = {'bs_df': bs_df, 'is_df': is_df, 'cf_df': cf_df}
data['bs_df'] = bs_df
data['is_df'] = is_df
data['cf_df'] = cf_df
fileout(data)
def fileout(data):
bsheet_string = "_Balance_Sheets.csv"
isheet_string = "_Income_Statement.csv"
csheet_string = "_Cash_Flow_Statement.csv"
bs_df = data['bs_df']
is_df = data['is_df']
cf_df = data['cf_df']
ticker = data['company_ticker']
csv_filename = f"{ticker}{bsheet_string}"
bs_df.to_csv(csv_filename, index=False)
csv_filename = f"{ticker}{isheet_string}"
is_df.to_csv(csv_filename, index=False)
csv_filename = f"{ticker}{csheet_string}"
cf_df.to_csv(csv_filename, index=False)Additional Context
There seems to be several (or one error causing many others) issues with DIS stitching
This issue will be handled using EdgarTools' systematic issue resolution workflow. A reproduction test will be created to verify the fix.