nesticot commited on
Commit
00197be
·
verified ·
1 Parent(s): a4bf659

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -320,6 +320,13 @@ def server(input, output, session):
320
  )))).with_columns(
321
  pl.col('pitch_type').count().over('pitch_type').alias('pitch_count')
322
  ))
 
 
 
 
 
 
 
323
  return df
324
 
325
 
 
320
  )))).with_columns(
321
  pl.col('pitch_type').count().over('pitch_type').alias('pitch_count')
322
  ))
323
+
324
+ df = df.with_columns(
325
+ prop_percent=(pl.col('is_pitch') / pl.col('is_pitch').sum()).over("pitch_type"),
326
+ prop=pl.col('is_pitch').sum().over("pitch_type")
327
+ )
328
+
329
+
330
  return df
331
 
332