I am getting the following error:
UnboundLocalError: local variable 'concated_data' referenced before assignment
When trying to run the following:
for idx, day_row in ecb_curr_df.iterrows():
av_last_month, rate_end_last_mon = last_months_avs(df_to_date, day_row['From_Currency'], day_row['To_Currency'], day_row['Obs_Date'])
data = pd.concat(concated_data, ignore_index=True)
concated_data = ({'Obs_Date': day_row['Obs_Date'], 'From_Currency': day_row['From_Currency'],
'To_Currency': day_row['To_Currency'], 'Rate': day_row['Rate'],
'PE_Rate': av_last_month, 'Mon_End_Rate': rate_end_last_mon})
new_df = pd.DataFrame(data)