mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
fix missing 'title' in imf economic indicators (#7010)
This commit is contained in:
@@ -294,6 +294,10 @@ class ImfEconomicIndicatorsFetcher(
|
||||
by=["date", "parent", "symbol", "value"],
|
||||
ascending=[True, True, True, False],
|
||||
).reset_index(drop=True)
|
||||
|
||||
df.loc[:, "title"] = df.symbol.apply(
|
||||
lambda x: all_symbols.get(x, {}).get("title")
|
||||
)
|
||||
records = df.replace({nan: None}).to_dict(orient="records")
|
||||
|
||||
return [ImfEconomicIndicatorsData.model_validate(r) for r in records]
|
||||
|
||||
Reference in New Issue
Block a user