nesticot commited on
Commit
54d2aec
·
verified ·
1 Parent(s): 536d2ef

Update pitch_summary_functions.py

Browse files
Files changed (1) hide show
  1. pitch_summary_functions.py +2 -2
pitch_summary_functions.py CHANGED
@@ -237,8 +237,8 @@ def df_clean(df):
237
 
238
  df_copy['pitch_l'] = [1 if x == 'L' else 0 for x in df_copy['pitcher_hand']]
239
  df_copy['bat_l'] = [1 if x == 'L' else 0 for x in df_copy['batter_hand']]
240
- df_copy = df_copy[~df_copy.pitch_type.isin(["EP", "PO", "KN", "CS", "SC", "FA"])].reset_index(drop=True)
241
- df_copy['pitch_type'] = df_copy['pitch_type'].replace({'FT':'SI','KC':'CU','SV':'SL','FO':'FS'})
242
 
243
  # df_copy['des_new'] = df_copy['play_description'].map(des_dict)
244
  # df_copy['ev_new'] = df_copy.loc[df_copy['des_new'] == 'hit_into_play','event_type'].map(ev_dict)
 
237
 
238
  df_copy['pitch_l'] = [1 if x == 'L' else 0 for x in df_copy['pitcher_hand']]
239
  df_copy['bat_l'] = [1 if x == 'L' else 0 for x in df_copy['batter_hand']]
240
+ #df_copy = df_copy[~df_copy.pitch_type.isin(["EP", "PO", "KN", "CS", "SC", "FA"])].reset_index(drop=True)
241
+ df_copy['pitch_type'] = df_copy['pitch_type'].replace({'FT':'SI'})
242
 
243
  # df_copy['des_new'] = df_copy['play_description'].map(des_dict)
244
  # df_copy['ev_new'] = df_copy.loc[df_copy['des_new'] == 'hit_into_play','event_type'].map(ev_dict)