I have 2 dataframes (dfA, dfB)
I have another dataframe dfC which has a column called 'SOURCE'. Values of SOURCE will either be dfA or dfB.
I am trying to go row by row on dfC and depending on the SOURCE field, either update dfA or dfB.
To do this I tried to create a variable 'a' which will take the value of SOURCE. The issue is, 'a will equal 'dfA' or 'dfB' (reads it as a string). I cannot use this string to call the correct dataframe (error thrown)
for i in [0, len(dfC.index)-1]:
a = dfC.loc[i,'Source']
temp = a[['colA', 'colB', colC']]][(a['movement_id']) == dfC.loc[i,'TEMP']]