Python Forum

Full Version: Interpretation of a code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear Python Users,

Please, help me to interpret the following line of a code (I have two df - futures_data and options_data):
for option in options_data.index:
    # iterating over all option quotes
    forward = futures_data[futures_data['MATURITY'] == \
                options_data.loc[option]['MATURITY']]['PRICE'].values[0]
The things that I dont understand:
- what is the meaning of [/b]index in "...options_data.index:"
- the line of code after the "for" loop

Please, advise me this issue
What is options_data ? type(options_data).