I am trying to make a loop to add columns to existing variables (there are between 10 to 15 variables called option0, option1,...optionn). Each option variable has its own columns, but I need to add more columns to each variable. Doing it one by one is inefficient, doing it with a loop, does not work. Example for option0:
option0['Risk_rate'] = rfr.column[0]
Example for n options:
for opt in range(0, len(aapl.expiry_dates)):
['option%s' % opt['Risk_rate']] = rfr.column[0]
A proper hint would be really handy and would save me a lot of inefficient code!