I have a for loop, in which I want to call a different pd.Dataframes in each loop and add a certain column ('feedin') to another dataframe. The variable name consists of 'feedin_' + x. Lets say a,b and c. So in the first loop I want to call the variable feedin_a and add the column 'feedin' to the new dataframe. In the next feedin_b and so on.
I pass a list of ['a', 'b', 'c'] and try to combine feedin_+ a. But since the list consists of string parameters it wont call the variable
feedin_a = pd.Dataframe
feedin_b = pd.Dataframe
feedin_c = pd.Dataframe
list = ['a', 'b', 'c']
for name in list:
df.new['feedin_'+name] = 'feedin_'+name['feedin']
Which doesnt work because the variable is called as a string. I hope you get my problem.