Jul 21, 2024
yf.Ticker('AAPL')
to create a ticker object for Appleticker.info
to get a dictionary with detailed informationtickers = ['AAPL', 'MSFT', 'IBM']
info_list = []
for i in tickers: info_list.append(yf.Ticker(i).info)
fundamentals = ['dividendYield', 'marketCap', 'beta', 'forwardPE']
df = pd.DataFrame(info_list)
df.set_index('symbol', inplace=True)
df_filtered = df[fundamentals]
plt.bar
for visual comparisondf_tickers = pd.read_html(url)[1]
tickers = df_tickers['Symbol'].tolist()
df_dow = pd.DataFrame(info_list)
df_dow.set_index('symbol', inplace=True)