Skip to content

Commit

Permalink
query parameter is added
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuttlas90 committed Jul 15, 2024
1 parent e4436e4 commit 5049f63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def sfmono():
if "token" in st.session_state:
df = pd.read_csv("data.csv").dropna()
list_of_name = df['name'].to_list()
name = st.sidebar.selectbox("لیست سهام", options = list_of_name)
if "stock" in st.query_params:
STOCK_INDEX = list_of_name.index(st.query_params.stock)
else:
STOCK_INDEX = 0
name = st.sidebar.selectbox("لیست سهام", options = list_of_name, index=STOCK_INDEX)

queries = Queries(name)

Expand Down

0 comments on commit 5049f63

Please sign in to comment.