nesticot commited on
Commit
d272dcf
1 Parent(s): df85249

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -86,10 +86,10 @@ def server(input,output,session):
86
  def plot():
87
 
88
  batter_id_select = int(input.batter_id())
89
- df_batter_2023 = df_2023_bip.loc[(df_2023_bip['batter_id'] == batter_id_select)&(df_2023_bip['season']=={season})]
90
  df_batter_2022 = df_2023_bip.loc[(df_2023_bip['batter_id'] == batter_id_select)&(df_2023_bip['season']==2022)]
91
 
92
- df_non_batter_2023 = df_2023_bip.loc[(df_2023_bip['batter_id'] != batter_id_select)&(df_2023_bip['season']=={season})]
93
  df_non_batter_2022 = df_2023_bip.loc[(df_2023_bip['batter_id'] != batter_id_select)&(df_2023_bip['season']==2022)]
94
 
95
  traj_df = df_batter_2023.groupby(['traj'])['launch_speed'].count() / len(df_batter_2023)
 
86
  def plot():
87
 
88
  batter_id_select = int(input.batter_id())
89
+ df_batter_2023 = df_2023_bip.loc[(df_2023_bip['batter_id'] == batter_id_select)&(df_2023_bip['season']==season)]
90
  df_batter_2022 = df_2023_bip.loc[(df_2023_bip['batter_id'] == batter_id_select)&(df_2023_bip['season']==2022)]
91
 
92
+ df_non_batter_2023 = df_2023_bip.loc[(df_2023_bip['batter_id'] != batter_id_select)&(df_2023_bip['season']==season)]
93
  df_non_batter_2022 = df_2023_bip.loc[(df_2023_bip['batter_id'] != batter_id_select)&(df_2023_bip['season']==2022)]
94
 
95
  traj_df = df_batter_2023.groupby(['traj'])['launch_speed'].count() / len(df_batter_2023)