mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 19:02:19 +00:00
Added error handling to check correspondence of fiscal dates in balance sheet and income statement (#5147)
This commit is contained in:
@@ -740,6 +740,12 @@ def get_dupont(symbol: str) -> pd.DataFrame:
|
||||
)
|
||||
return pd.DataFrame()
|
||||
|
||||
if not df_bs.index.equals(df_is.index):
|
||||
console.print(
|
||||
"The fiscal dates in the balance sheet do not correspond to the fiscal dates in the income statement."
|
||||
)
|
||||
return pd.DataFrame()
|
||||
|
||||
# pylint: disable=no-member
|
||||
df_bs = df_bs.set_index("fiscalDateEnding")
|
||||
df_is = df_is.set_index("fiscalDateEnding")
|
||||
|
||||
Reference in New Issue
Block a user