Skip to content

Commit

Permalink
fix uk daily data (#4078)
Browse files Browse the repository at this point in the history
Co-authored-by: James Maslek <[email protected]>
  • Loading branch information
montezdesousa and jmaslek authored Jan 30, 2023
1 parent 4c80b75 commit ef54049
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit ef54049

Please sign in to comment.