Update app.py
Browse files
app.py
CHANGED
@@ -206,8 +206,8 @@ def server(input, output, session):
|
|
206 |
pitcher_input = int(input.player_id())
|
207 |
pitch_input = input.pitch_type()
|
208 |
|
209 |
-
df_plot_full = df_2024[(df_2024['pitcher_id']==pitcher_input)
|
210 |
-
|
211 |
(pd.to_datetime(df_plot_full['game_date']).dt.date<=input.date_range_id()[1])]
|
212 |
|
213 |
df_plot_full['h_s_b'] = df_plot_full.groupby(['batter_hand','strikes', 'balls']).transform('count')['pitcher_id']
|
|
|
206 |
pitcher_input = int(input.player_id())
|
207 |
pitch_input = input.pitch_type()
|
208 |
|
209 |
+
df_plot_full = df_2024[(df_2024['pitcher_id']==pitcher_input)&
|
210 |
+
(pd.to_datetime(df_plot_full['game_date']).dt.date>=input.date_range_id()[0])&
|
211 |
(pd.to_datetime(df_plot_full['game_date']).dt.date<=input.date_range_id()[1])]
|
212 |
|
213 |
df_plot_full['h_s_b'] = df_plot_full.groupby(['batter_hand','strikes', 'balls']).transform('count')['pitcher_id']
|