hotfix/fix-balance-headers: Fixes #5094 (#5099)

* fixes bad headers for ca/financial statements

* remove unnecessary lines
This commit is contained in:
Danglewood
2023-06-02 06:06:28 -07:00
committed by GitHub
parent d662b69c6f
commit f0e0217083
6 changed files with 166 additions and 168 deletions

View File

@@ -376,13 +376,15 @@ def combine_similar_financials(
datasets[similar[0]].columns
).index(timeframe)
for symbol in similar[1:]:
for symbol in similar:
report_quarter_date = list(datasets[symbol].columns)[-idx]
earnings_dates.append(report_quarter_date)
compare_financials[symbol] = datasets[symbol][report_quarter_date]
compare_financials[symbol + " (" + report_quarter_date + ")"] = datasets[
symbol
][report_quarter_date]
compare_financials.columns = pd.MultiIndex.from_tuples(
zip(earnings_dates, compare_financials.columns),
compare_financials.drop(
columns=compare_financials.columns[0], axis=1, inplace=True
)
else:
@@ -392,4 +394,4 @@ def combine_similar_financials(
for symbol in similar[1:]:
compare_financials[symbol] = datasets[symbol][timeframe]
return compare_financials
return compare_financials.fillna("-").replace("-", "")

View File

@@ -5,47 +5,47 @@ Cost of Goods Sold (COGS) incl. D&A,24.91B,101.91B
COGS Growth,21.44%,-12.16%
COGS excluding D&A,22.58B,89.24B
Depreciation & Amortization Expense,2.32B,12.68B
Depreciation,-,12.53B
Amortization of Intangibles,-,144M
Depreciation,,12.53B
Amortization of Intangibles,,144M
Gross Income,6.63B,20.57B
Gross Income Growth,62.94%,-3.02%
Gross Profit Margin,-,-
Gross Profit Margin,,
SG&A Expense,4.64B,13.24B
SGA Growth,16.22%,-13.43%
Research & Development,1.49B,6.2B
Other SG&A,3.15B,7.04B
Other Operating Expense,-,-
Other Operating Expense,,
Unusual Expense,36M,296M
EBIT after Unusual Expense,1.96B,7.04B
Non Operating Income/Expense,(86M),1.24B
Non-Operating Interest Income,30M,241M
Equity in Affiliates (Pretax),-,674M
Equity in Affiliates (Pretax),,674M
Interest Expense,748M,1.1B
Interest Expense Growth,9.20%,40.41%
Gross Interest Expense,796M,1.1B
Interest Capitalized,48M,-
Interest Capitalized,48M,
Pretax Income,1.15B,8.1B
Pretax Income Growth,273.53%,8.86%
Pretax Margin,-,-
Pretax Margin,,
Income Tax,292M,1.77B
Income Tax - Current Domestic,4M,356M
Income Tax - Current Foreign,248M,493M
Income Tax - Deferred Domestic,-,617M
Income Tax - Deferred Domestic,,617M
Income Tax - Deferred Foreign,40M,308M
Income Tax Credits,-,-
Equity in Affiliates,-,-
Other After Tax Income (Expense),(31M),-
Income Tax Credits,,
Equity in Affiliates,,
Other After Tax Income (Expense),(31M),
Consolidated Net Income,831M,6.32B
Minority Interest Expense,141M,(106M)
Net Income,690M,6.43B
Net Income Growth,179.31%,-4.53%
Net Margin Growth,-,-
Extraordinaries & Discontinued Operations,-,-
Extra Items & Gain/Loss Sale Of Assets,-,-
Cumulative Effect - Accounting Chg,-,-
Discontinued Operations,-,-
Net Margin Growth,,
Extraordinaries & Discontinued Operations,,
Extra Items & Gain/Loss Sale Of Assets,,
Cumulative Effect - Accounting Chg,,
Discontinued Operations,,
Net Income After Extraordinaries,690M,6.43B
Preferred Dividends,-,180M
Preferred Dividends,,180M
Net Income Available to Common,690M,6.25B
EPS (Basic),0.25,4.36
EPS (Basic) Growth,175.41%,-5.67%
@@ -55,4 +55,4 @@ EPS (Diluted) Growth,164.97%,-5.27%
Diluted Shares Outstanding,3.25B,1.44B
EBITDA,4.32B,20.01B
EBITDA Growth,93.20%,0.15%
EBITDA Margin,-,-
EBITDA Margin,,
1 Item TSLA GM
5 COGS Growth 21.44% -12.16%
6 COGS excluding D&A 22.58B 89.24B
7 Depreciation & Amortization Expense 2.32B 12.68B
8 Depreciation - 12.53B
9 Amortization of Intangibles - 144M
10 Gross Income 6.63B 20.57B
11 Gross Income Growth 62.94% -3.02%
12 Gross Profit Margin - -
13 SG&A Expense 4.64B 13.24B
14 SGA Growth 16.22% -13.43%
15 Research & Development 1.49B 6.2B
16 Other SG&A 3.15B 7.04B
17 Other Operating Expense - -
18 Unusual Expense 36M 296M
19 EBIT after Unusual Expense 1.96B 7.04B
20 Non Operating Income/Expense (86M) 1.24B
21 Non-Operating Interest Income 30M 241M
22 Equity in Affiliates (Pretax) - 674M
23 Interest Expense 748M 1.1B
24 Interest Expense Growth 9.20% 40.41%
25 Gross Interest Expense 796M 1.1B
26 Interest Capitalized 48M -
27 Pretax Income 1.15B 8.1B
28 Pretax Income Growth 273.53% 8.86%
29 Pretax Margin - -
30 Income Tax 292M 1.77B
31 Income Tax - Current Domestic 4M 356M
32 Income Tax - Current Foreign 248M 493M
33 Income Tax - Deferred Domestic - 617M
34 Income Tax - Deferred Foreign 40M 308M
35 Income Tax Credits - -
36 Equity in Affiliates - -
37 Other After Tax Income (Expense) (31M) -
38 Consolidated Net Income 831M 6.32B
39 Minority Interest Expense 141M (106M)
40 Net Income 690M 6.43B
41 Net Income Growth 179.31% -4.53%
42 Net Margin Growth - -
43 Extraordinaries & Discontinued Operations - -
44 Extra Items & Gain/Loss Sale Of Assets - -
45 Cumulative Effect - Accounting Chg - -
46 Discontinued Operations - -
47 Net Income After Extraordinaries 690M 6.43B
48 Preferred Dividends - 180M
49 Net Income Available to Common 690M 6.25B
50 EPS (Basic) 0.25 4.36
51 EPS (Basic) Growth 175.41% -5.67%
55 Diluted Shares Outstanding 3.25B 1.44B
56 EBITDA 4.32B 20.01B
57 EBITDA Growth 93.20% 0.15%
58 EBITDA Margin - -

View File

@@ -1,53 +1,51 @@
,31-Dec-2021,31-Dec-2021
,TSLA,GM
Item,,
Item,TSLA (31-Dec-2021),GM (31-Dec-2021)
Sales/Revenue,17.72B,33.58B
Sales Growth,28.80%,25.41%
Cost of Goods Sold (COGS) incl. D&A,12.87B,29.59B
COGS Growth,27.48%,28.71%
COGS excluding D&A,12.02B,26.65B
Depreciation & Amortization Expense,848M,2.94B
Depreciation,530M,-
Amortization of Intangibles,318M,-
Depreciation,530M,
Amortization of Intangibles,318M,
Gross Income,4.85B,4B
Gross Income Growth,32.43%,5.40%
Gross Profit Margin,-,-
Gross Profit Margin,,
SG&A Expense,2.23B,2.48B
SGA Growth,39.19%,15.36%
Research & Development,740M,-
Other SG&A,-,-
Other Operating Expense,-,-
Research & Development,740M,
Other SG&A,,
Other Operating Expense,,
Unusual Expense,(1M),17M
EBIT after Unusual Expense,1M,(17M)
Non Operating Income/Expense,67M,631M
Non-Operating Interest Income,25M,44M
Equity in Affiliates (Pretax),-,286M
Equity in Affiliates (Pretax),,286M
Interest Expense,71M,227M
Interest Expense Growth,-43.65%,-1.30%
Gross Interest Expense,72M,227M
Interest Capitalized,1M,-
Interest Capitalized,1M,
Pretax Income,2.64B,2.24B
Pretax Income Growth,40.01%,-11.86%
Pretax Margin,-,-
Pretax Margin,,
Income Tax,292M,471M
Income Tax - Current Domestic,-,-
Income Tax - Current Foreign,-,-
Income Tax - Deferred Domestic,-,-
Income Tax - Deferred Foreign,-,-
Income Tax Credits,-,-
Equity in Affiliates,-,-
Other After Tax Income (Expense),-,-
Income Tax - Current Domestic,,
Income Tax - Current Foreign,,
Income Tax - Deferred Domestic,,
Income Tax - Deferred Foreign,,
Income Tax Credits,,
Equity in Affiliates,,
Other After Tax Income (Expense),,
Consolidated Net Income,2.34B,1.77B
Minority Interest Expense,22M,25M
Net Income,2.32B,1.74B
Net Income Growth,43.45%,-28.06%
Net Margin Growth,-,-
Extraordinaries & Discontinued Operations,-,-
Extra Items & Gain/Loss Sale Of Assets,-,-
Cumulative Effect - Accounting Chg,-,-
Discontinued Operations,-,-
Net Margin Growth,,
Extraordinaries & Discontinued Operations,,
Extra Items & Gain/Loss Sale Of Assets,,
Cumulative Effect - Accounting Chg,,
Discontinued Operations,,
Net Income After Extraordinaries,2.32B,1.74B
Preferred Dividends,-,45M
Preferred Dividends,,45M
Net Income Available to Common,2.32B,1.7B
EPS (Basic),0.76,1.17
EPS (Basic) Growth,41.04%,-28.64%
@@ -57,4 +55,4 @@ EPS (Diluted) Growth,41.91%,-28.83%
Diluted Shares Outstanding,3.4B,1.47B
EBITDA,3.46B,4.46B
EBITDA Growth,22.90%,-5.69%
EBITDA Margin,-,-
EBITDA Margin,,
1 Item 31-Dec-2021 TSLA (31-Dec-2021) 31-Dec-2021 GM (31-Dec-2021)
TSLA GM
Item
2 Sales/Revenue Sales/Revenue 17.72B 17.72B 33.58B 33.58B
3 Sales Growth Sales Growth 28.80% 28.80% 25.41% 25.41%
4 Cost of Goods Sold (COGS) incl. D&A Cost of Goods Sold (COGS) incl. D&A 12.87B 12.87B 29.59B 29.59B
5 COGS Growth COGS Growth 27.48% 27.48% 28.71% 28.71%
6 COGS excluding D&A COGS excluding D&A 12.02B 12.02B 26.65B 26.65B
7 Depreciation & Amortization Expense Depreciation & Amortization Expense 848M 848M 2.94B 2.94B
8 Depreciation Depreciation 530M 530M -
9 Amortization of Intangibles Amortization of Intangibles 318M 318M -
10 Gross Income Gross Income 4.85B 4.85B 4B 4B
11 Gross Income Growth Gross Income Growth 32.43% 32.43% 5.40% 5.40%
12 Gross Profit Margin Gross Profit Margin - -
13 SG&A Expense SG&A Expense 2.23B 2.23B 2.48B 2.48B
14 SGA Growth SGA Growth 39.19% 39.19% 15.36% 15.36%
15 Research & Development Research & Development 740M 740M -
16 Other SG&A Other SG&A - -
17 Other Operating Expense Other Operating Expense - -
18 Unusual Expense Unusual Expense (1M) (1M) 17M 17M
19 EBIT after Unusual Expense EBIT after Unusual Expense 1M 1M (17M) (17M)
20 Non Operating Income/Expense Non Operating Income/Expense 67M 67M 631M 631M
21 Non-Operating Interest Income Non-Operating Interest Income 25M 25M 44M 44M
22 Equity in Affiliates (Pretax) Equity in Affiliates (Pretax) - 286M 286M
23 Interest Expense Interest Expense 71M 71M 227M 227M
24 Interest Expense Growth Interest Expense Growth -43.65% -43.65% -1.30% -1.30%
25 Gross Interest Expense Gross Interest Expense 72M 72M 227M 227M
26 Interest Capitalized Interest Capitalized 1M 1M -
27 Pretax Income Pretax Income 2.64B 2.64B 2.24B 2.24B
28 Pretax Income Growth Pretax Income Growth 40.01% 40.01% -11.86% -11.86%
29 Pretax Margin Pretax Margin - -
30 Income Tax Income Tax 292M 292M 471M 471M
31 Income Tax - Current Domestic Income Tax - Current Domestic - -
32 Income Tax - Current Foreign Income Tax - Current Foreign - -
33 Income Tax - Deferred Domestic Income Tax - Deferred Domestic - -
34 Income Tax - Deferred Foreign Income Tax - Deferred Foreign - -
35 Income Tax Credits Income Tax Credits - -
36 Equity in Affiliates Equity in Affiliates - -
37 Other After Tax Income (Expense) Other After Tax Income (Expense) - -
38 Consolidated Net Income Consolidated Net Income 2.34B 2.34B 1.77B 1.77B
39 Minority Interest Expense Minority Interest Expense 22M 22M 25M 25M
40 Net Income Net Income 2.32B 2.32B 1.74B 1.74B
41 Net Income Growth Net Income Growth 43.45% 43.45% -28.06% -28.06%
42 Net Margin Growth Net Margin Growth - -
43 Extraordinaries & Discontinued Operations Extraordinaries & Discontinued Operations - -
44 Extra Items & Gain/Loss Sale Of Assets Extra Items & Gain/Loss Sale Of Assets - -
45 Cumulative Effect - Accounting Chg Cumulative Effect - Accounting Chg - -
46 Discontinued Operations Discontinued Operations - -
47 Net Income After Extraordinaries Net Income After Extraordinaries 2.32B 2.32B 1.74B 1.74B
48 Preferred Dividends Preferred Dividends - 45M 45M
49 Net Income Available to Common Net Income Available to Common 2.32B 2.32B 1.7B 1.7B
50 EPS (Basic) EPS (Basic) 0.76 0.76 1.17 1.17
51 EPS (Basic) Growth EPS (Basic) Growth 41.04% 41.04% -28.64% -28.64%
55 Diluted Shares Outstanding Diluted Shares Outstanding 3.4B 3.4B 1.47B 1.47B
56 EBITDA EBITDA 3.46B 3.46B 4.46B 4.46B
57 EBITDA Growth EBITDA Growth 22.90% 22.90% -5.69% -5.69%
58 EBITDA Margin EBITDA Margin - -

View File

@@ -1,41 +1,40 @@
Other available quarterly timeframes are: 30-Sep-2021, 31-Dec-2021, 31-Mar-2022, 30-Jun-2022, 30-Sep-2022
31-Dec-2021
TSLA GM
Item
Cash & Short Term Investments 18.05B 31.61B
Cash & Short Term Investments Growth 9.93% 18.03%
Cash Only 17.92B 23B
Short-Term Investments - -
Cash & ST Investments / Total Assets 29.05% 12.92%
Total Accounts Receivable 1.91B 34.04B
Total Accounts Receivable Growth -2.50% 2.59%
Accounts Receivables, Net 1.91B 34.04B
Accounts Receivables, Gross 1.91B 34.94B
Bad Debt/Doubtful Accounts - (895M)
Other Receivable - -
Accounts Receivable Turnover 9.26 0.99
Inventories 5.76B 12.99B
Finished Goods 1.28B 4.75B
Work in Progress 1.09B -
Raw Materials 3.39B 8.24B
Progress Payments & Other - -
Other Current Assets 1.38B 3.46B
Miscellaneous Current Assets 1.38B 3.46B
Total Current Assets 27.1B 82.1B
Net Property, Plant & Equipment 31.18B 80.14B
Property, Plant & Equipment - Gross 39.87B 111.43B
Buildings - -
Land & Improvements - -
Computer Software and Equipment 1.41B -
Other Property, Plant & Equipment - -
Accumulated Depreciation 8.69B 31.29B
Total Investments and Advances 223M 10.22B
Other Long-Term Investments 223M 540M
Long-Term Note Receivables 299M 36.17B
Intangible Assets 1.72B 5.09B
Net Goodwill 200M 1.91B
Net Other Intangibles - -
Other Assets 1.62B 9.85B
Total Assets 62.13B 244.72B
Total Assets Growth 7.43% 2.58%
TSLA (31-Dec-2021) GM (31-Dec-2021)
Item
Cash & Short Term Investments 18.05B 31.61B
Cash & Short Term Investments Growth 9.93% 18.03%
Cash Only 17.92B 23B
Short-Term Investments
Cash & ST Investments / Total Assets 29.05% 12.92%
Total Accounts Receivable 1.91B 34.04B
Total Accounts Receivable Growth -2.50% 2.59%
Accounts Receivables, Net 1.91B 34.04B
Accounts Receivables, Gross 1.91B 34.94B
Bad Debt/Doubtful Accounts (895M)
Other Receivable
Accounts Receivable Turnover 9.26 0.99
Inventories 5.76B 12.99B
Finished Goods 1.28B 4.75B
Work in Progress 1.09B
Raw Materials 3.39B 8.24B
Progress Payments & Other
Other Current Assets 1.38B 3.46B
Miscellaneous Current Assets 1.38B 3.46B
Total Current Assets 27.1B 82.1B
Net Property, Plant & Equipment 31.18B 80.14B
Property, Plant & Equipment - Gross 39.87B 111.43B
Buildings
Land & Improvements
Computer Software and Equipment 1.41B
Other Property, Plant & Equipment
Accumulated Depreciation 8.69B 31.29B
Total Investments and Advances 223M 10.22B
Other Long-Term Investments 223M 540M
Long-Term Note Receivables 299M 36.17B
Intangible Assets 1.72B 5.09B
Net Goodwill 200M 1.91B
Net Other Intangibles
Other Assets 1.62B 9.85B
Total Assets 62.13B 244.72B
Total Assets Growth 7.43% 2.58%

View File

@@ -1,22 +1,22 @@
Other available quarterly timeframes are: 30-Sep-2021, 31-Dec-2021, 31-Mar-2022, 30-Jun-2022, 30-Sep-2022
31-Dec-2021 TSLA 31-Dec-2021 GM
Item
Net Income before Extraordinaries 2.34B 1.77B
Net Income Growth 41.23% -25.98%
Depreciation, Depletion & Amortization 848M 2.94B
Depreciation and Depletion 530M -
Amortization of Intangible Assets 318M -
Deferred Taxes & Investment Tax Credit - 251M
Deferred Taxes - 251M
Investment Tax Credit - -
Other Funds 539M (783M)
Funds from Operations 3.73B 4.17B
Extraordinaries - -
Changes in Working Capital 855M 2.64B
Receivables 18M -
Accounts Payable 1.81B -
Other Assets/Liabilities (443M) 4.59B
Net Operating Cash Flow 4.59B 6.81B
Net Operating Cash Flow Growth 45.69% 13,995.92%
Net Operating Cash Flow / Sales 25.88% 20.27%
TSLA (31-Dec-2021) GM (31-Dec-2021)
Item
Net Income before Extraordinaries 2.34B 1.77B
Net Income Growth 41.23% -25.98%
Depreciation, Depletion & Amortization 848M 2.94B
Depreciation and Depletion 530M
Amortization of Intangible Assets 318M
Deferred Taxes & Investment Tax Credit 251M
Deferred Taxes 251M
Investment Tax Credit
Other Funds 539M (783M)
Funds from Operations 3.73B 4.17B
Extraordinaries
Changes in Working Capital 855M 2.64B
Receivables 18M
Accounts Payable 1.81B
Other Assets/Liabilities (443M) 4.59B
Net Operating Cash Flow 4.59B 6.81B
Net Operating Cash Flow Growth 45.69% 13,995.92%
Net Operating Cash Flow / Sales 25.88% 20.27%

View File

@@ -1,62 +1,61 @@
Other available quarterly timeframes are: 30-Sep-2021, 31-Dec-2021, 31-Mar-2022, 30-Jun-2022, 30-Sep-2022
31-Dec-2021
TSLA GM
Item
Sales/Revenue 17.72B 33.58B
Sales Growth 28.80% 25.41%
Cost of Goods Sold (COGS) incl. D&A 12.87B 29.59B
COGS Growth 27.48% 28.71%
COGS excluding D&A 12.02B 26.65B
Depreciation & Amortization Expense 848M 2.94B
Depreciation 530M -
Amortization of Intangibles 318M -
Gross Income 4.85B 4B
Gross Income Growth 32.43% 5.40%
Gross Profit Margin - -
SG&A Expense 2.23B 2.48B
SGA Growth 39.19% 15.36%
Research & Development 740M -
Other SG&A - -
Other Operating Expense - -
Unusual Expense (1M) 17M
EBIT after Unusual Expense 1M (17M)
Non Operating Income/Expense 67M 631M
Non-Operating Interest Income 25M 44M
Equity in Affiliates (Pretax) - 286M
Interest Expense 71M 227M
Interest Expense Growth -43.65% -1.30%
Gross Interest Expense 72M 227M
Interest Capitalized 1M -
Pretax Income 2.64B 2.24B
Pretax Income Growth 40.01% -11.86%
Pretax Margin - -
Income Tax 292M 471M
Income Tax - Current Domestic - -
Income Tax - Current Foreign - -
Income Tax - Deferred Domestic - -
Income Tax - Deferred Foreign - -
Income Tax Credits - -
Equity in Affiliates - -
Other After Tax Income (Expense) - -
Consolidated Net Income 2.34B 1.77B
Minority Interest Expense 22M 25M
Net Income 2.32B 1.74B
Net Income Growth 43.45% -28.06%
Net Margin Growth - -
Extraordinaries & Discontinued Operations - -
Extra Items & Gain/Loss Sale Of Assets - -
Cumulative Effect - Accounting Chg - -
Discontinued Operations - -
Net Income After Extraordinaries 2.32B 1.74B
Preferred Dividends - 45M
Net Income Available to Common 2.32B 1.7B
EPS (Basic) 0.76 1.17
EPS (Basic) Growth 41.04% -28.64%
Basic Shares Outstanding 3.04B 1.45B
EPS (Diluted) 0.68 1.15
EPS (Diluted) Growth 41.91% -28.83%
Diluted Shares Outstanding 3.4B 1.47B
EBITDA 3.46B 4.46B
EBITDA Growth 22.90% -5.69%
EBITDA Margin - -
TSLA (31-Dec-2021) GM (31-Dec-2021)
Item
Sales/Revenue 17.72B 33.58B
Sales Growth 28.80% 25.41%
Cost of Goods Sold (COGS) incl. D&A 12.87B 29.59B
COGS Growth 27.48% 28.71%
COGS excluding D&A 12.02B 26.65B
Depreciation & Amortization Expense 848M 2.94B
Depreciation 530M
Amortization of Intangibles 318M
Gross Income 4.85B 4B
Gross Income Growth 32.43% 5.40%
Gross Profit Margin
SG&A Expense 2.23B 2.48B
SGA Growth 39.19% 15.36%
Research & Development 740M
Other SG&A
Other Operating Expense
Unusual Expense (1M) 17M
EBIT after Unusual Expense 1M (17M)
Non Operating Income/Expense 67M 631M
Non-Operating Interest Income 25M 44M
Equity in Affiliates (Pretax) 286M
Interest Expense 71M 227M
Interest Expense Growth -43.65% -1.30%
Gross Interest Expense 72M 227M
Interest Capitalized 1M
Pretax Income 2.64B 2.24B
Pretax Income Growth 40.01% -11.86%
Pretax Margin
Income Tax 292M 471M
Income Tax - Current Domestic
Income Tax - Current Foreign
Income Tax - Deferred Domestic
Income Tax - Deferred Foreign
Income Tax Credits
Equity in Affiliates
Other After Tax Income (Expense)
Consolidated Net Income 2.34B 1.77B
Minority Interest Expense 22M 25M
Net Income 2.32B 1.74B
Net Income Growth 43.45% -28.06%
Net Margin Growth
Extraordinaries & Discontinued Operations
Extra Items & Gain/Loss Sale Of Assets
Cumulative Effect - Accounting Chg
Discontinued Operations
Net Income After Extraordinaries 2.32B 1.74B
Preferred Dividends 45M
Net Income Available to Common 2.32B 1.7B
EPS (Basic) 0.76 1.17
EPS (Basic) Growth 41.04% -28.64%
Basic Shares Outstanding 3.04B 1.45B
EPS (Diluted) 0.68 1.15
EPS (Diluted) Growth 41.91% -28.83%
Diluted Shares Outstanding 3.4B 1.47B
EBITDA 3.46B 4.46B
EBITDA Growth 22.90% -5.69%
EBITDA Margin