Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -527,7 +527,7 @@ with tab3:
|
|
527 |
stat_drop = hitter_data_cols
|
528 |
working_data = hitter_gamelog_table
|
529 |
player_var3 = st.selectbox("Which player are you viewing?", player_drop, key='player_var3')
|
530 |
-
plot_count = st.radio("how many stats would you like to plot?", ('One', 'Two', '
|
531 |
if plot_count == "One":
|
532 |
plot_var1 = st.selectbox("Which stat are you viewing?", stat_drop, key='plot_var1')
|
533 |
elif plot_count == "Two":
|
@@ -556,6 +556,10 @@ with tab3:
|
|
556 |
working_data = working_data[working_data['Date'] <= sp_high_date]
|
557 |
working_data = working_data[working_data['Team'].isin(sp_team_var1)]
|
558 |
working_data = working_data[working_data['Player'] == player_var3]
|
559 |
-
graph_data = working_data.reindex(['Date', plot_var1],axis="columns")
|
560 |
|
561 |
-
|
|
|
|
|
|
|
|
|
|
|
|
527 |
stat_drop = hitter_data_cols
|
528 |
working_data = hitter_gamelog_table
|
529 |
player_var3 = st.selectbox("Which player are you viewing?", player_drop, key='player_var3')
|
530 |
+
plot_count = st.radio("how many stats would you like to plot?", ('One', 'Two', 'Three'), key='plot_count')
|
531 |
if plot_count == "One":
|
532 |
plot_var1 = st.selectbox("Which stat are you viewing?", stat_drop, key='plot_var1')
|
533 |
elif plot_count == "Two":
|
|
|
556 |
working_data = working_data[working_data['Date'] <= sp_high_date]
|
557 |
working_data = working_data[working_data['Team'].isin(sp_team_var1)]
|
558 |
working_data = working_data[working_data['Player'] == player_var3]
|
|
|
559 |
|
560 |
+
if plot_count == "One":
|
561 |
+
graph_data = working_data.reindex(['Date', plot_var1],axis="columns")
|
562 |
+
st.line_chart(graph_data, x="Date", y=plot_var1)
|
563 |
+
elif plot_count == "Two":
|
564 |
+
graph_data = working_data.reindex(['Date', plot_var1, plot_var2],axis="columns")
|
565 |
+
st.line_chart(graph_data, x="Date", y=[plot_var1, plot_var2], color=["#FF0000", "#0000FF"])
|