Skip to content

Instantly share code, notes, and snippets.

@susanli2016
Created June 21, 2022 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save susanli2016/48c0e6690f786c96411b189900fbb7f4 to your computer and use it in GitHub Desktop.
Save susanli2016/48c0e6690f786c96411b189900fbb7f4 to your computer and use it in GitHub Desktop.
g7_list = df_g7['series_id'].tolist()
start_date = '1970-01-01'
end_date = '2021-10-01'
df_g7 = get_fred_data(series_list = g7_list,
start_date = start_date,
end_date = end_date)
df_g7_melt = pd.melt(df_g7, id_vars = ['DATE'], value_vars = g7_list, var_name = 'SERIES_ID', value_name = 'VALUE')
df_g7_melt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment