Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -623,7 +623,7 @@ def server(input, output, session):
|
|
| 623 |
'17':50,}
|
| 624 |
|
| 625 |
batter_summary_filter = batter_summary.filter((pl.col('pa') >= level_dict_filter[str(sport_id)]) & (pl.col('launch_speed') >= 0))
|
| 626 |
-
stat_list = batter_summary.columns[
|
| 627 |
batter_summary_filter_pd = batter_summary_filter.to_pandas()
|
| 628 |
new_player_metrics = batter_summary.filter(pl.col('batter_id') == batter_id)[['batter_id'] + stat_list]
|
| 629 |
if len(new_player_metrics) == 0:
|
|
@@ -991,7 +991,7 @@ def server(input, output, session):
|
|
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
-
stat_list = pitcher_summary.columns[
|
| 995 |
pitcher_summary_filter_pd = pitcher_summary_filter.to_pandas()
|
| 996 |
new_player_metrics = pitcher_summary.filter(pl.col('pitcher_id') == pitcher_id)[['pitcher_id'] + stat_list]
|
| 997 |
if len(new_player_metrics) == 0:
|
|
|
|
| 623 |
'17':50,}
|
| 624 |
|
| 625 |
batter_summary_filter = batter_summary.filter((pl.col('pa') >= level_dict_filter[str(sport_id)]) & (pl.col('launch_speed') >= 0))
|
| 626 |
+
stat_list = [item for item in batter_summary.columns if item not in ['batter_id', 'batter_name']]
|
| 627 |
batter_summary_filter_pd = batter_summary_filter.to_pandas()
|
| 628 |
new_player_metrics = batter_summary.filter(pl.col('batter_id') == batter_id)[['batter_id'] + stat_list]
|
| 629 |
if len(new_player_metrics) == 0:
|
|
|
|
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
+
stat_list = [item for item in pitcher_summary.columns if item not in ['pitcher_id', 'pitcher_name']]
|
| 995 |
pitcher_summary_filter_pd = pitcher_summary_filter.to_pandas()
|
| 996 |
new_player_metrics = pitcher_summary.filter(pl.col('pitcher_id') == pitcher_id)[['pitcher_id'] + stat_list]
|
| 997 |
if len(new_player_metrics) == 0:
|