Open david08-08 opened 3 days ago
Here is the code I am using
import pandas as pd from rich import print from edgar import Company, set_identity from edgar.company_reports import TenK, TenQ, TwentyF, EightK from edgar.htmltools import ChunkedDocument
set_identity("david@gmail.com")
pd.options.display.max_colwidth = 40
tenq = Company("NOW").get_filings(form="10-Q")[0].obj() financials = tenq.financials
balance_sheet_df = financials.get_balance_sheet().get_dataframe() cash_flow_df = financials.get_cash_flow_statement().get_dataframe() income_statement_df = financials.get_income_statement().get_dataframe()
print(balance_sheet_df.head()) # For checking the first few rows print(cash_flow_df.head()) print(income_statement_df.head())
output_file = "/Users/david/Documents/NOW_10Q_Financials_with_labels.xlsx"
with pd.ExcelWriter(output_file, engine='xlsxwriter') as writer: balance_sheet_df.to_excel(writer, sheet_name='Balance Sheet', index=True) # Include index if labels are part of it cash_flow_df.to_excel(writer, sheet_name='Cash Flow Statement', index=True) income_statement_df.to_excel(writer, sheet_name='Income Statement', index=True)
print(f"NOW 10-Q Financials with labels have been saved to {output_file}"
If there is another code I should be using or if you can provide an enhancement so I can get this fixed I would greatly appreciate it. @pierotofy @dgunning
I see the issue. Investigating
Hi Dwight, thank you. Please let me know as soon as you can. I appreciate your help. @dgunning
Hi Dwight,
I just noticed the same thing as well with ticker symbol TER. Not all the statements are being exported to excel when using the XBRL library for the most recent quarterly statement which was issued this past week. I listed the statements below. In addition when pulling the quarterly filing using the TENQ library the cash flow statement is not exporting to excel.
Please advise. Thank you.
Screenshot when pulling through TENQ:
XBRL statements missing from most recent quarterly filing:
| Condensed Consolidated Statements of Operations for the Three and Six Months ended June 30, 2024 and July 2, 2023 | 2
| Condensed Consolidated Statements of Comprehensive Income for the Three and Six Months ended June 30, 2024, and July 2, 2023