An app showing stock prices from yahoo finance
To upload files, please first save the app
import streamlit as st
import yfinance as yf
import pandas as pd
st.title("Stock Prices Viewer")
# User input for stock ticker
stock_ticker = st.text_input("Enter stock ticker (e.g., AAPL, GOOGL):")
if stock_ticker:
# Fetch historical stock data
stock_data = yf.download(stock_ticker, start="2020-01-01", end=pd.datetime.now())
st.write(f"Showing historical stock data for {stock_ticker}")
st.line_chart(stock_data['Close'])
st.table(stock_data)
else:
st.write("Please enter a stock ticker to see the data.")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?