nesticot commited on
Commit
889f229
·
verified ·
1 Parent(s): f7a8425

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -743,6 +743,14 @@ def server(input, output, session):
743
 
744
  print(df.schema)
745
  print(df_2.schema)
 
 
 
 
 
 
 
 
746
 
747
  df_legend = pl.concat([df, df_2], rechunk=True)
748
  # # Create legend for pitch types
 
743
 
744
  print(df.schema)
745
  print(df_2.schema)
746
+ columns_to_cast = [
747
+ "trajectory_fly_ball", "trajectory_ground_ball",
748
+ "trajectory_line_drive", "trajectory_popup",
749
+ "count", "pitch_count"
750
+ ]
751
+
752
+ df = df.with_columns([pl.col(col).cast(pl.Int32) for col in columns_to_cast])
753
+ df_2 = df_2.with_columns([pl.col(col).cast(pl.Int32) for col in columns_to_cast])
754
 
755
  df_legend = pl.concat([df, df_2], rechunk=True)
756
  # # Create legend for pitch types