From 369c8a60c88a58620c6ff38731ce0b1ca7ca4468 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Sat, 25 Jan 2025 14:10:27 -0800 Subject: [PATCH] fix missing 'title' in imf economic indicators (#7010) --- .../providers/imf/openbb_imf/models/economic_indicators.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py b/openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py index 87b2bdf6b89..a7011f121f2 100644 --- a/openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py +++ b/openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py @@ -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]