Update functions/pitch_summary_functions.py
Browse files
functions/pitch_summary_functions.py
CHANGED
|
@@ -1112,11 +1112,11 @@ def stat_summary_table(df: pl.DataFrame,
|
|
| 1112 |
if df['game_id'][0] == df['game_id'][-1]:
|
| 1113 |
pitcher_stats_call_df_small = pitcher_stats_call_df.select(['inningsPitched', 'battersFaced', 'earnedRuns', 'hits', 'strikeOuts', 'baseOnBalls', 'hitByPitch', 'homeRuns', 'strikePercentage', 'whiffs'])
|
| 1114 |
new_column_names = ['$\\bf{IP}$', '$\\bf{PA}$', '$\\bf{ER}$', '$\\bf{H}$', '$\\bf{K}$', '$\\bf{BB}$', '$\\bf{HBP}$', '$\\bf{HR}$', '$\\bf{Strike\%}$', '$\\bf{Whiffs}$']
|
| 1115 |
-
title = f'{df["game_date"][0]} vs {df["batter_team"][0]}'
|
| 1116 |
elif sport_id != 1 or game_type[0] in ['S','P']:
|
| 1117 |
pitcher_stats_call_df_small = pitcher_stats_call_df.select(['inningsPitched', 'battersFaced', 'whip', 'era', 'fip', 'k_percent', 'bb_percent', 'k_bb_percent', 'strikePercentage'])
|
| 1118 |
new_column_names = ['$\\bf{IP}$', '$\\bf{PA}$', '$\\bf{WHIP}$', '$\\bf{ERA}$', '$\\bf{FIP}$', '$\\bf{K\%}$', '$\\bf{BB\%}$', '$\\bf{K-BB\%}$', '$\\bf{Strike\%}$']
|
| 1119 |
-
title = f'{
|
| 1120 |
else:
|
| 1121 |
fangraphs_table(df=df, ax=ax, player_input=player_input, season=int(df['game_date'][0][0:4]), split=split)
|
| 1122 |
return
|
|
|
|
| 1112 |
if df['game_id'][0] == df['game_id'][-1]:
|
| 1113 |
pitcher_stats_call_df_small = pitcher_stats_call_df.select(['inningsPitched', 'battersFaced', 'earnedRuns', 'hits', 'strikeOuts', 'baseOnBalls', 'hitByPitch', 'homeRuns', 'strikePercentage', 'whiffs'])
|
| 1114 |
new_column_names = ['$\\bf{IP}$', '$\\bf{PA}$', '$\\bf{ER}$', '$\\bf{H}$', '$\\bf{K}$', '$\\bf{BB}$', '$\\bf{HBP}$', '$\\bf{HR}$', '$\\bf{Strike\%}$', '$\\bf{Whiffs}$']
|
| 1115 |
+
title = f'{df["game_date"][0]} vs {df["batter_team"][0]} ({type_dict[game_type[0]]})'
|
| 1116 |
elif sport_id != 1 or game_type[0] in ['S','P']:
|
| 1117 |
pitcher_stats_call_df_small = pitcher_stats_call_df.select(['inningsPitched', 'battersFaced', 'whip', 'era', 'fip', 'k_percent', 'bb_percent', 'k_bb_percent', 'strikePercentage'])
|
| 1118 |
new_column_names = ['$\\bf{IP}$', '$\\bf{PA}$', '$\\bf{WHIP}$', '$\\bf{ERA}$', '$\\bf{FIP}$', '$\\bf{K\%}$', '$\\bf{BB\%}$', '$\\bf{K-BB\%}$', '$\\bf{Strike\%}$']
|
| 1119 |
+
title = f'{df["game_date"][0]} to {df["game_date"][-1]} ({type_dict[game_type[0]]})'
|
| 1120 |
else:
|
| 1121 |
fangraphs_table(df=df, ax=ax, player_input=player_input, season=int(df['game_date'][0][0:4]), split=split)
|
| 1122 |
return
|