Update app.py
Browse files
app.py
CHANGED
|
@@ -246,7 +246,7 @@ def server(input, output, session):
|
|
| 246 |
|
| 247 |
year = int(input.year_input())
|
| 248 |
sport_id = int(input.level_input())
|
| 249 |
-
batter_summary = pl.
|
| 250 |
# Map elements in Polars DataFrame from a dictionary
|
| 251 |
batter_summary = batter_summary.with_columns(
|
| 252 |
pl.col("pitcher_id").map_elements(lambda x: batter_dict_pos.get(x, x)).alias("position")
|
|
|
|
| 246 |
|
| 247 |
year = int(input.year_input())
|
| 248 |
sport_id = int(input.level_input())
|
| 249 |
+
batter_summary = pl.read_parquet(f"hf://datasets/TJStatsApps/mlb_data/summary/pitcher_summary_{level_dict_file[str(sport_id)]}_{year}_spring.parquet").sort('pitcher_name',descending=False)
|
| 250 |
# Map elements in Polars DataFrame from a dictionary
|
| 251 |
batter_summary = batter_summary.with_columns(
|
| 252 |
pl.col("pitcher_id").map_elements(lambda x: batter_dict_pos.get(x, x)).alias("position")
|