fix missing 'title' in imf economic indicators (#7010)

This commit is contained in:
Danglewood
2025-01-25 14:10:27 -08:00
committed by GitHub
parent 9fb0f336be
commit 369c8a60c8

View File

@@ -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]