Below is my code to pull stock option data from a list of stock tickers. The code runs through all the tickers without error, but my dataframe (opt_df) meant to capture ALL the tickers' data ends up empty:
opt_df = DataFrame()
for symbol in tickers:
try:
ticker = yf.Ticker(symbol)
opt = ticker.option_chain('2021-07-30')
opt_df.append(opt)
except ValueError:
continue