Multichem commited on
Commit
983ba74
·
verified ·
1 Parent(s): cd5129e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -521,9 +521,11 @@ with tab3:
521
  if plot_type == "Pitcher":
522
  player_drop = total_pitchers
523
  stat_drop = pitcher_data_cols
 
524
  elif plot_type == "Hitter":
525
  player_drop = total_hitters
526
  stat_drop = hitter_data_cols
 
527
  player_var3 = st.selectbox("Which player are you viewing?", player_drop, key='player_var3')
528
  plot_count = st.radio("how many stats would you like to plot?", ('One', 'Two', 'three'), key='plot_count')
529
  if plot_count == "One":
@@ -550,4 +552,10 @@ with tab3:
550
  plot_high_date = pitcher_gamelog_table['Date'].max()
551
 
552
  with col2:
553
- st.write("Things will go here")
 
 
 
 
 
 
 
521
  if plot_type == "Pitcher":
522
  player_drop = total_pitchers
523
  stat_drop = pitcher_data_cols
524
+ working_data = pitcher_gamelog_table
525
  elif plot_type == "Hitter":
526
  player_drop = total_hitters
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":
 
552
  plot_high_date = pitcher_gamelog_table['Date'].max()
553
 
554
  with col2:
555
+ working_data = working_data[working_data['Date'] >= sp_low_date]
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(plot_var1,axis="columns")
560
+
561
+ st.line_chart(graph_data)