I am trying to create a selectbox for users to choose their time frame (form & to) and then use the output of this selectboxes as an input to fetch data from Yahoo Finance. Any idea how can I do this ?
import yfinance as yf
import streamlit as st
import pandas as pd
start=st.selectbox('From', df['Time'])
end=st.selectbox('To',df['Time'])
tickerSymbol='TSLA'
tickerdata=yf.Ticker(tickerSymbol)
tickerDF=tickerData.history(period='1d',start=start,end=end)
st.line_chart(tikerDF)