nesticot commited on
Commit
88546ca
·
verified ·
1 Parent(s): cf3973b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -750,8 +750,8 @@ def server(input, output, session):
750
  pl.col('release_pos_x').mean().alias('release_pos_x'),
751
  pl.col('extension').mean().alias('extension'),
752
  pl.col('tj_stuff_plus').mean().alias('tj_stuff_plus'),
753
- (pl.col('start_speed').filter(pl.col('batter_hand')=='L').count()).alias('rhh_count'),
754
- (pl.col('start_speed').filter(pl.col('batter_hand')=='R').count()).alias('lhh_count')
755
  ])
756
 
757
  # Join total pitches per pitcher to the grouped DataFrame on pitcher_id
 
750
  pl.col('release_pos_x').mean().alias('release_pos_x'),
751
  pl.col('extension').mean().alias('extension'),
752
  pl.col('tj_stuff_plus').mean().alias('tj_stuff_plus'),
753
+ (pl.col("batter_hand").eq("R").sum()).alias("rhh_count"), # Corrected: Counts RHH (batter_hand == "R")
754
+ (pl.col("batter_hand").eq("L").sum()).alias("lhh_count") # Corrected: Counts LHH (batter_hand == "L")
755
  ])
756
 
757
  # Join total pitches per pitcher to the grouped DataFrame on pitcher_id