Update app.py
Browse files
app.py
CHANGED
|
@@ -741,9 +741,20 @@ def server(input, output, session):
|
|
| 741 |
def grid_pbp():
|
| 742 |
|
| 743 |
data_list = scrape.get_data(game_list_input = [int(input.game_id())])
|
| 744 |
-
df = scrape.get_data_df(data_list = data_list)
|
| 745 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 746 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 747 |
|
| 748 |
return render.DataGrid(
|
| 749 |
df.to_pandas(),
|
|
|
|
| 741 |
def grid_pbp():
|
| 742 |
|
| 743 |
data_list = scrape.get_data(game_list_input = [int(input.game_id())])
|
| 744 |
+
# df = scrape.get_data_df(data_list = data_list)
|
| 745 |
+
|
| 746 |
+
|
| 747 |
+
|
| 748 |
+
df = (stuff_apply.stuff_apply(fe.feature_engineering(update.update(scrape.get_data_df(data_list = data_list).filter(
|
| 749 |
+
(pl.col("is_pitch") == True)&
|
| 750 |
+
(pl.col('batter_hand').is_in(split_dict_hand[input.split_id()]))
|
| 751 |
|
| 752 |
+
)))).with_columns(
|
| 753 |
+
pl.col('pitch_type').count().over('pitch_type').alias('pitch_count')
|
| 754 |
+
).with_columns(
|
| 755 |
+
(pl.col('pitcher_name')+' - '+pl.col('pitcher_team')).alias('pitcher_name'))
|
| 756 |
+
)
|
| 757 |
+
df = df.clone()
|
| 758 |
|
| 759 |
return render.DataGrid(
|
| 760 |
df.to_pandas(),
|