Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UK Economy/Macro Y10YD bug #4078

Merged
merged 3 commits into from
Jan 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions openbb_terminal/economy/econdb_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,10 @@ def get_macro_data(
f"NEW: {df_new_oldest} - {df_new_newest}"
)

if not df.empty:
df = df.groupby(df.index.strftime("%Y-%m")).head(1)
df.index = df.index.strftime("%Y-%m")

except HTTPError:
return console.print(
f"There is no data available for the combination {parameter} and {country}."
Expand Down Expand Up @@ -724,6 +728,7 @@ def get_aggregated_macro_data(
).T

(df_rounded, denomination) = transform_by_denomination(country_data_df)
df_rounded.index = pd.DatetimeIndex(df_rounded.index)

return (
df_rounded,
Expand Down