mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-04 00:12:29 +00:00
Fix filings analysis (#4732)
This commit is contained in:
@@ -53,6 +53,18 @@ def get_filings_analysis(symbol: str) -> pd.DataFrame:
|
||||
map(resultGroupMapper("Risk factors"), response_dict[0]["rf_highlights"]),
|
||||
columns=["Group", "Good", "Sentence"],
|
||||
)
|
||||
|
||||
if risk.empty:
|
||||
response_dict_rf = [x for x in response_dict if x["rf_highlights"] != []]
|
||||
if response_dict_rf != []:
|
||||
risk = pd.DataFrame(
|
||||
map(
|
||||
resultGroupMapper("Risk factors"),
|
||||
response_dict_rf[0]["rf_highlights"],
|
||||
),
|
||||
columns=["Group", "Good", "Sentence"],
|
||||
)
|
||||
|
||||
analysis = pd.DataFrame(
|
||||
map(
|
||||
resultGroupMapper("Discussion and Analysis"),
|
||||
|
||||
Reference in New Issue
Block a user